Skip to content

Commit

Permalink
Merge pull request #473 from asit-dhal/master
Browse files Browse the repository at this point in the history
fixed length and upper case log level tags(after suggestion)
  • Loading branch information
gabime authored Jul 12, 2017
2 parents 4371092 + 3a40f0c commit b75da32
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/spdlog/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ typedef enum
off = 6
} 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" };

Expand Down
7 changes: 7 additions & 0 deletions include/spdlog/tweakme.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@
//
// #define SPDLOG_ENABLE_MESSAGE_COUNTER
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// Uncomment to enable user defined tag names
//
// #define SPDLOG_LEVEL_NAMES { " TRACE", " DEBUG", " INFO",
// " WARNING", " ERROR", "CRITICAL", "OFF" };
///////////////////////////////////////////////////////////////////////////////

0 comments on commit b75da32

Please sign in to comment.