Better mapping of Hamlib message severity to ours

This commit is contained in:
Bill Somerville 2020-09-26 15:44:58 +01:00
parent 1b941af851
commit 47f85961aa
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
2 changed files with 4 additions and 4 deletions

View File

@ -137,11 +137,11 @@ int HamlibTransceiver::debug_callback (enum rig_debug_level_e level, rig_ptr_t a
auto severity = boost::log::trivial::trace;
switch (level)
{
case RIG_DEBUG_BUG: severity = boost::log::trivial::debug; break;
case RIG_DEBUG_BUG: severity = boost::log::trivial::fatal; break;
case RIG_DEBUG_ERR: severity = boost::log::trivial::error; break;
case RIG_DEBUG_WARN: severity = boost::log::trivial::warning; break;
case RIG_DEBUG_TRACE: severity = boost::log::trivial::info; break;
case RIG_DEBUG_VERBOSE: severity = boost::log::trivial::trace; break;
case RIG_DEBUG_VERBOSE: severity = boost::log::trivial::debug; break;
case RIG_DEBUG_TRACE: severity = boost::log::trivial::trace; break;
default: break;
};
if (level != RIG_DEBUG_NONE) // no idea what level NONE means so

View File

@ -150,7 +150,7 @@ WSJTXLogging::WSJTXLogging ()
// Per channel severity level filter
using min_severity_filter = expr::channel_severity_filter_actor<std::wstring, trivial::severity_level>;
min_severity_filter min_severity = expr::channel_severity_filter (channel, severity);
min_severity[L"SYSLOG"] = trivial::trace;
min_severity[L"SYSLOG"] = trivial::info;
min_severity[L"RIGCTRL"] = trivial::info;
min_severity[L"DATALOG"] = trivial::info;
sys_sink->set_filter (min_severity || severity >= trivial::fatal);