2020-09-18 16:23:11 -04:00
|
|
|
#ifndef WSJTX_LOGGING_HPP__
|
|
|
|
#define WSJTX_LOGGING_HPP__
|
|
|
|
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
class QString;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Class WSJTXLogging - wraps application specific logging
|
|
|
|
//
|
|
|
|
class WSJTXLogging final
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit WSJTXLogging ();
|
|
|
|
~WSJTXLogging ();
|
|
|
|
|
|
|
|
//
|
|
|
|
// Install this as the Qt message handler (qInstallMessageHandler)
|
2020-09-26 09:15:44 -04:00
|
|
|
// to integrate Qt messages. This handler can be installed at any
|
|
|
|
// time, it does not rely on an instance of WSJTXLogging existing,
|
|
|
|
// so logging occurring before the logging sinks, filters, and
|
|
|
|
// formatters, etc, are established can take place.
|
2020-09-18 16:23:11 -04:00
|
|
|
static void qt_log_handler (QtMsgType type, QMessageLogContext const& context, QString const&);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|