Merge pull request #473 from asit-dhal/master

fixed length and upper case log level tags(after suggestion)
This commit is contained in:
Gabi Melman 2017-07-13 01:19:31 +03:00 committed by GitHub
commit b75da32f4d
2 changed files with 11 additions and 1 deletions

View File

@ -81,7 +81,10 @@ typedef enum
off = 6 off = 6
} level_enum; } level_enum;
static const char* level_names[] { "trace", "debug", "info", "warning", "error", "critical", "off" }; #if !defined(SPDLOG_LEVEL_NAMES)
#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warning", "error", "critical", "off" };
#endif
static const char* level_names[] SPDLOG_LEVEL_NAMES
static const char* short_level_names[] { "T", "D", "I", "W", "E", "C", "O" }; static const char* short_level_names[] { "T", "D", "I", "W", "E", "C", "O" };

View File

@ -132,3 +132,10 @@
// //
// #define SPDLOG_ENABLE_MESSAGE_COUNTER // #define SPDLOG_ENABLE_MESSAGE_COUNTER
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to enable user defined tag names
//
// #define SPDLOG_LEVEL_NAMES { " TRACE", " DEBUG", " INFO",
// " WARNING", " ERROR", "CRITICAL", "OFF" };
///////////////////////////////////////////////////////////////////////////////