...
This commit is contained in:
@@ -686,7 +686,7 @@ public:
|
||||
typedef CharTraitsT char_traits_t;
|
||||
|
||||
enum loglevel_t { NULL_LEVEL, ERROR_LEVEL, INFO_LEVEL, DEBUG_LEVEL };
|
||||
static constexpr std::array logLevelMark{"null", "error", "info", "debug"};
|
||||
static constexpr std::array LOGLEVEL_MARK{"null", "error", "info", "debug"};
|
||||
|
||||
AdcOstreamLogger(std::basic_ostream<CharT, CharTraitsT>& stream = std::cout, loglevel_t log_level = INFO_LEVEL)
|
||||
: _logStream(stream), _currentLogLevel(log_level)
|
||||
@@ -725,7 +725,7 @@ public:
|
||||
// format log-message in form:
|
||||
// [YYYY-MM-DD HH:MM:SS][level] log-message
|
||||
//
|
||||
_logStream << std::put_time(std::localtime(&now), "[%F %T]") << "[" << logLevelMark[_currentLogLevel] << "] "
|
||||
_logStream << std::put_time(std::localtime(&now), "[%F %T]") << "[" << LOGLEVEL_MARK[_currentLogLevel] << "] "
|
||||
<< s;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user