mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
f66788691d
uses a settings file to define log sink back-ends, by default uses :/wsjtx_log_config.ini from the resources file-system. Users may override by placing their own wsjtx_log_config.ini into the WSJT-X config location. The settings file format is as described in the Boost log documentation (https://www.boost.org/doc/libs/1_74_0/libs/log/doc/html/log/detailed/utilities.html#log.detailed.utilities.setup.settings_file) with the additional feature that allows some pre-defined variables to be expanded. The predefined variables refer to standard locations in the file-system, and allow log files and rotation target directory paths to be specified. The pre-defined variables are: DesktopLocation DocumentsLocation TempLocation HomeLocation CacheLocation GenericCacheLocation GenericDataLocation AppDataLocation and must be used enclosed on braces and preceded by a '$' character. E.g. to define the pattern for a sink's log file: FileName="${AppLocalDataLocation}/wsjtx_syslog.log" this would place the log file wsjtx_syslog.log in the WSJT-X log files directory, on all platforms.
24 lines
457 B
C++
24 lines
457 B
C++
#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)
|
|
// to integrate Qt messages.
|
|
static void qt_log_handler (QtMsgType type, QMessageLogContext const& context, QString const&);
|
|
};
|
|
|
|
#endif
|