diff options
Diffstat (limited to 'src/common/logging/log.h')
| -rw-r--r-- | src/common/logging/log.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 1b29ce6e0..48f85deac 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -92,19 +92,6 @@ enum class Class : ClassType { | |||
| 92 | Count ///< Total number of logging classes | 92 | Count ///< Total number of logging classes |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | /// Logs a message to the global logger. | ||
| 96 | void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, | ||
| 97 | const char* function, | ||
| 98 | #ifdef _MSC_VER | ||
| 99 | _Printf_format_string_ | ||
| 100 | #endif | ||
| 101 | const char* format, | ||
| 102 | ...) | ||
| 103 | #ifdef __GNUC__ | ||
| 104 | __attribute__((format(printf, 6, 7))) | ||
| 105 | #endif | ||
| 106 | ; | ||
| 107 | |||
| 108 | /// Logs a message to the global logger, using fmt | 95 | /// Logs a message to the global logger, using fmt |
| 109 | void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, | 96 | void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, |
| 110 | unsigned int line_num, const char* function, const char* format, | 97 | unsigned int line_num, const char* function, const char* format, |
| @@ -119,28 +106,6 @@ void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsig | |||
| 119 | 106 | ||
| 120 | } // namespace Log | 107 | } // namespace Log |
| 121 | 108 | ||
| 122 | #define LOG_GENERIC(log_class, log_level, ...) \ | ||
| 123 | ::Log::LogMessage(log_class, log_level, __FILE__, __LINE__, __func__, __VA_ARGS__) | ||
| 124 | |||
| 125 | #ifdef _DEBUG | ||
| 126 | #define LOG_TRACE(log_class, ...) \ | ||
| 127 | LOG_GENERIC(::Log::Class::log_class, ::Log::Level::Trace, __VA_ARGS__) | ||
| 128 | #else | ||
| 129 | #define LOG_TRACE(log_class, ...) (void(0)) | ||
| 130 | #endif | ||
| 131 | |||
| 132 | #define LOG_DEBUG(log_class, ...) \ | ||
| 133 | LOG_GENERIC(::Log::Class::log_class, ::Log::Level::Debug, __VA_ARGS__) | ||
| 134 | #define LOG_INFO(log_class, ...) \ | ||
| 135 | LOG_GENERIC(::Log::Class::log_class, ::Log::Level::Info, __VA_ARGS__) | ||
| 136 | #define LOG_WARNING(log_class, ...) \ | ||
| 137 | LOG_GENERIC(::Log::Class::log_class, ::Log::Level::Warning, __VA_ARGS__) | ||
| 138 | #define LOG_ERROR(log_class, ...) \ | ||
| 139 | LOG_GENERIC(::Log::Class::log_class, ::Log::Level::Error, __VA_ARGS__) | ||
| 140 | #define LOG_CRITICAL(log_class, ...) \ | ||
| 141 | LOG_GENERIC(::Log::Class::log_class, ::Log::Level::Critical, __VA_ARGS__) | ||
| 142 | |||
| 143 | // Define the fmt lib macros | ||
| 144 | #ifdef _DEBUG | 109 | #ifdef _DEBUG |
| 145 | #define NGLOG_TRACE(log_class, ...) \ | 110 | #define NGLOG_TRACE(log_class, ...) \ |
| 146 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, __FILE__, __LINE__, \ | 111 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, __FILE__, __LINE__, \ |