|
|
@ -1099,13 +1099,7 @@ namespace llarp
|
|
|
|
"logging",
|
|
|
|
"logging",
|
|
|
|
"type",
|
|
|
|
"type",
|
|
|
|
DefaultLogType,
|
|
|
|
DefaultLogType,
|
|
|
|
[this](std::string arg) {
|
|
|
|
[this](std::string arg) { m_logType = log::type_from_string(arg); },
|
|
|
|
auto type = log::type_from_string(arg);
|
|
|
|
|
|
|
|
if (type == log::Type::Unknown)
|
|
|
|
|
|
|
|
throw std::invalid_argument{fmt::format("invalid log type: {}", arg)};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_logType = type;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Comment{
|
|
|
|
Comment{
|
|
|
|
"Log type (format). Valid options are:",
|
|
|
|
"Log type (format). Valid options are:",
|
|
|
|
" print - print logs to standard output",
|
|
|
|
" print - print logs to standard output",
|
|
|
@ -1117,13 +1111,7 @@ namespace llarp
|
|
|
|
"logging",
|
|
|
|
"logging",
|
|
|
|
"level",
|
|
|
|
"level",
|
|
|
|
DefaultLogLevel,
|
|
|
|
DefaultLogLevel,
|
|
|
|
[this](std::string arg) {
|
|
|
|
[this](std::string arg) { m_logLevel = log::level_from_string(arg); },
|
|
|
|
std::optional<log::Level> level = log::level_from_string(arg);
|
|
|
|
|
|
|
|
if (not level)
|
|
|
|
|
|
|
|
throw std::invalid_argument{fmt::format("invalid log level value: {}", arg)};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_logLevel = *level;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Comment{
|
|
|
|
Comment{
|
|
|
|
"Minimum log level to print. Logging below this level will be ignored.",
|
|
|
|
"Minimum log level to print. Logging below this level will be ignored.",
|
|
|
|
"Valid log levels, in ascending order, are:",
|
|
|
|
"Valid log levels, in ascending order, are:",
|
|
|
|