Commit ee22eed2 authored by steven lunt's avatar steven lunt

add macros for overriding the individual level names

parent ab72de5f
...@@ -152,10 +152,38 @@ enum level_enum ...@@ -152,10 +152,38 @@ enum level_enum
n_levels n_levels
}; };
#if !defined(SPDLOG_LEVEL_NAME_TRACE)
#define SPDLOG_LEVEL_NAME_TRACE "trace"
#endif
#if !defined(SPDLOG_LEVEL_NAME_DEBUG)
#define SPDLOG_LEVEL_NAME_DEBUG "debug"
#endif
#if !defined(SPDLOG_LEVEL_NAME_INFO)
#define SPDLOG_LEVEL_NAME_INFO "info"
#endif
#if !defined(SPDLOG_LEVEL_NAME_WARNING)
#define SPDLOG_LEVEL_NAME_WARNING "warning"
#endif
#if !defined(SPDLOG_LEVEL_NAME_ERROR)
#define SPDLOG_LEVEL_NAME_ERROR "error"
#endif
#if !defined(SPDLOG_LEVEL_NAME_CRITICAL)
#define SPDLOG_LEVEL_NAME_CRITICAL "critical"
#endif
#if !defined(SPDLOG_LEVEL_NAME_OFF)
#define SPDLOG_LEVEL_NAME_OFF "off"
#endif
#if !defined(SPDLOG_LEVEL_NAMES) #if !defined(SPDLOG_LEVEL_NAMES)
#define SPDLOG_LEVEL_NAMES \ #define SPDLOG_LEVEL_NAMES \
{ \ { \
"trace", "debug", "info", "warning", "error", "critical", "off" \ SPDLOG_LEVEL_NAME_TRACE, SPDLOG_LEVEL_NAME_DEBUG, SPDLOG_LEVEL_NAME_INFO, SPDLOG_LEVEL_NAME_WARNING, SPDLOG_LEVEL_NAME_ERROR, SPDLOG_LEVEL_NAME_CRITICAL, SPDLOG_LEVEL_NAME_OFF \
} }
#endif #endif
......
...@@ -87,12 +87,54 @@ ...@@ -87,12 +87,54 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize level names (e.g. "MT TRACE") // Uncomment to customize level names (e.g. "MY TRACE")
// //
// #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING", // #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING",
// "MY ERROR", "MY CRITICAL", "OFF" } // "MY ERROR", "MY CRITICAL", "OFF" }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the trace level name
//
// #define SPDLOG_LEVEL_NAME_TRACE "MY TRACE"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the debug level name
//
// #define SPDLOG_LEVEL_NAME_DEBUG "MY DEBUG"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the info level name
//
// #define SPDLOG_LEVEL_NAME_INFO "MY INFO"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the warning level name
//
// #define SPDLOG_LEVEL_NAME_WARNING "MY WARNING"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the error level name
//
// #define SPDLOG_LEVEL_NAME_ERROR "MY ERROR"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the critical level name
//
// #define SPDLOG_LEVEL_NAME_CRITICAL "MY CRITICAL"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize the off level name
//
// #define SPDLOG_LEVEL_NAME_OFF "MY OFF"
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Uncomment to customize short level names (e.g. "MT") // Uncomment to customize short level names (e.g. "MT")
// These can be longer than one character. // These can be longer than one character.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment