Commit e3106a01 authored by Max Kellermann's avatar Max Kellermann

LogInit: provide mappings for LogLevel::{ERROR,WARNING}

parent 3e0ceb12
......@@ -81,6 +81,8 @@ log_level <default, secure, or verbose>
Suppress all messages below the given threshold. The following
log levels are available:
- :samp:`error`: errors
- :samp:`warning`: warnings
- :samp:`default`: interesting informational messages
- :samp:`info`: unimportant informational messages
- :samp:`verbose`: debug messages (for developers and for
......
......@@ -103,6 +103,10 @@ parse_log_level(const char *value)
return LogLevel::INFO;
else if (StringIsEqual(value, "verbose"))
return LogLevel::DEBUG;
else if (StringIsEqual(value, "warning"))
return LogLevel::WARNING;
else if (StringIsEqual(value, "error"))
return LogLevel::ERROR;
else
throw FormatRuntimeError("unknown log level \"%s\"", value);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment