diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 0573d525..dee5baca 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -152,10 +152,38 @@ enum level_enum 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) #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 diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index 31e417ab..87c3d5fa 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -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", // "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") // These can be longer than one character.