mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-09-27 15:46:51 -04:00
Revert "backing out a smaller chunk of Boost::log functionality"
This reverts commit 5993b3c75a
.
This commit is contained in:
parent
896d75eb27
commit
2989e7d189
@ -195,8 +195,6 @@ WSJTXLogging::~WSJTXLogging ()
|
|||||||
// Reroute Qt messages to the system logger
|
// Reroute Qt messages to the system logger
|
||||||
void WSJTXLogging::qt_log_handler (QtMsgType type, QMessageLogContext const& context, QString const& msg)
|
void WSJTXLogging::qt_log_handler (QtMsgType type, QMessageLogContext const& context, QString const& msg)
|
||||||
{
|
{
|
||||||
std::cerr << "qt_log_handler: type: " << int(type) << " file: " << context.file << " line: " << context.line << " msg: " << msg.toStdString () << '\n';
|
|
||||||
|
|
||||||
// Convert Qt message types to logger severities
|
// Convert Qt message types to logger severities
|
||||||
auto severity = trivial::trace;
|
auto severity = trivial::trace;
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -223,17 +221,17 @@ void WSJTXLogging::qt_log_handler (QtMsgType type, QMessageLogContext const& con
|
|||||||
if (!context.category || !qstrcmp (context.category, "default"))
|
if (!context.category || !qstrcmp (context.category, "default"))
|
||||||
{
|
{
|
||||||
BOOST_LOG_SEV (log, severity)
|
BOOST_LOG_SEV (log, severity)
|
||||||
// << 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.toStdString ();
|
<< msg.toStdString ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BOOST_LOG_CHANNEL_SEV (log, std::string {context.category}, severity)
|
BOOST_LOG_CHANNEL_SEV (log, std::string {context.category}, severity)
|
||||||
// << 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.toStdString ();
|
<< msg.toStdString ();
|
||||||
}
|
}
|
||||||
if (QtFatalMsg == type)
|
if (QtFatalMsg == type)
|
||||||
|
Loading…
Reference in New Issue
Block a user