Avoid wide to narrow(UTF-8) conversion errors causing aborts

This commit is contained in:
Bill Somerville 2021-06-12 14:15:39 +01:00
parent c74e115d2d
commit 80448bfb57
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -93,7 +93,7 @@ namespace
<< boost::log::add_value ("Line", context.line) << boost::log::add_value ("Line", context.line)
<< boost::log::add_value ("File", file) << boost::log::add_value ("File", file)
<< boost::log::add_value ("Function", function) << boost::log::add_value ("Function", function)
<< msg.toStdWString (); << msg.toStdString ();
} }
else else
{ {
@ -101,7 +101,7 @@ namespace
<< boost::log::add_value ("Line", context.line) << boost::log::add_value ("Line", context.line)
<< boost::log::add_value ("File", file) << boost::log::add_value ("File", file)
<< boost::log::add_value ("Function", function) << boost::log::add_value ("Function", function)
<< context.category << ": " << msg.toStdWString (); << context.category << ": " << msg.toStdString ();
} }
} }
@ -132,7 +132,7 @@ namespace
#else #else
, keywords::file_name = , keywords::file_name =
#endif #endif
app_data.absoluteFilePath ("logs/wsjtx_syslog_%Y-%m.log").toStdString () app_data.absoluteFilePath ("logs/wsjtx_syslog_%Y-%m.log").toStdWString ()
, keywords::time_based_rotation = sinks::file::rotation_at_time_point (gregorian::greg_day (1), 0, 0, 0) , keywords::time_based_rotation = sinks::file::rotation_at_time_point (gregorian::greg_day (1), 0, 0, 0)
, keywords::open_mode = std::ios_base::out | std::ios_base::app , keywords::open_mode = std::ios_base::out | std::ios_base::app
#if BOOST_VERSION / 100 >= 1063 #if BOOST_VERSION / 100 >= 1063