LogInit: provide mappings for LogLevel::{ERROR,WARNING}
This commit is contained in:
parent
3e0ceb12d5
commit
e3106a019d
|
@ -81,6 +81,8 @@ log_level <default, secure, or verbose>
|
||||||
Suppress all messages below the given threshold. The following
|
Suppress all messages below the given threshold. The following
|
||||||
log levels are available:
|
log levels are available:
|
||||||
|
|
||||||
|
- :samp:`error`: errors
|
||||||
|
- :samp:`warning`: warnings
|
||||||
- :samp:`default`: interesting informational messages
|
- :samp:`default`: interesting informational messages
|
||||||
- :samp:`info`: unimportant informational messages
|
- :samp:`info`: unimportant informational messages
|
||||||
- :samp:`verbose`: debug messages (for developers and for
|
- :samp:`verbose`: debug messages (for developers and for
|
||||||
|
|
|
@ -103,6 +103,10 @@ parse_log_level(const char *value)
|
||||||
return LogLevel::INFO;
|
return LogLevel::INFO;
|
||||||
else if (StringIsEqual(value, "verbose"))
|
else if (StringIsEqual(value, "verbose"))
|
||||||
return LogLevel::DEBUG;
|
return LogLevel::DEBUG;
|
||||||
|
else if (StringIsEqual(value, "warning"))
|
||||||
|
return LogLevel::WARNING;
|
||||||
|
else if (StringIsEqual(value, "error"))
|
||||||
|
return LogLevel::ERROR;
|
||||||
else
|
else
|
||||||
throw FormatRuntimeError("unknown log level \"%s\"", value);
|
throw FormatRuntimeError("unknown log level \"%s\"", value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue