diff --git a/src/logging.h b/src/logging.h index 18eb2c61028..f9fddd5e3f2 100644 --- a/src/logging.h +++ b/src/logging.h @@ -63,13 +63,6 @@ struct LogCategory { }; namespace BCLog { - enum class Level { - Trace = 0, // High-volume or detailed logging for development/debugging - Debug, // Reasonably noisy logging, but still usable in production - Info, // Default - Warning, - Error, - }; constexpr auto DEFAULT_LOG_LEVEL{Level::Debug}; constexpr size_t DEFAULT_MAX_LOG_BUFFER{1'000'000}; // buffer up to 1MB of log data prior to StartLogging constexpr uint64_t RATELIMIT_MAX_BYTES{1024 * 1024}; // maximum number of bytes per source location that can be logged within the RATELIMIT_WINDOW diff --git a/src/util/log.h b/src/util/log.h index 7ad548631a7..f1d3bb26afd 100644 --- a/src/util/log.h +++ b/src/util/log.h @@ -29,4 +29,18 @@ private: std::source_location m_loc; }; +namespace util::log { +enum class Level { + Trace = 0, // High-volume or detailed logging for development/debugging + Debug, // Reasonably noisy logging, but still usable in production + Info, // Default + Warning, + Error, +}; +} // namespace util::log + +namespace BCLog { +//! Alias for compatibility. Prefer util::log::Level over BCLog::Level in new code. +using Level = util::log::Level; +} // namespace BCLog #endif // BITCOIN_UTIL_LOG_H