log: remove utility values from level_t enum
This commit is contained in:
parent
b107666376
commit
9f6d41eb8c
4
log.cpp
4
log.cpp
@ -85,12 +85,12 @@ log_level (void)
|
||||
{
|
||||
const char *env = getenv ("LOG_LEVEL");
|
||||
if (!env)
|
||||
return util::DEFAULT;
|
||||
return util::DEFAULT_LOG_LEVEL;
|
||||
|
||||
try {
|
||||
return to_level (env);
|
||||
} catch (...) {
|
||||
return util::DEFAULT;
|
||||
return util::DEFAULT_LOG_LEVEL;
|
||||
}
|
||||
}
|
||||
|
||||
|
7
log.hpp
7
log.hpp
@ -42,12 +42,11 @@ namespace util {
|
||||
NOTICE, /** normal but significant condition */
|
||||
INFORMATIONAL,
|
||||
INFO = INFORMATIONAL, /** informational messages */
|
||||
DEBUG, /** debug-level messages */
|
||||
|
||||
NUM_LEVELS,
|
||||
DEFAULT = INFO
|
||||
DEBUG /** debug-level messages */
|
||||
};
|
||||
|
||||
constexpr auto DEFAULT_LOG_LEVEL = INFO;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
std::ostream&
|
||||
operator<< (std::ostream&, level_t);
|
||||
|
Loading…
Reference in New Issue
Block a user