-
Notifications
You must be signed in to change notification settings - Fork 21
Debug Log Level
Under normal circumstances, QLog produces a minimal number of debug messages. The debug messages are printed to standard output (Linux).
QLog implements debug logging via QLoggingCategory. If a user encounters an issue and requires more verbose output, the verbosity can be set via OS's environment variable QT_LOGGING_RULES
.
For example, to enable very verbose output:
QT_LOGGING_RULES=*.debug=true ./qlog
To debug only the ADIF formatter, use:
QT_LOGGING_RULES=qlog.logformat.adiformat.*.debug=true ./qlog
Format of the debug output is:
14:35:17.363 [DEBUG ] [0x7f05083d2440] [qlog.logformat.adiformat.function.entered] => OUTPUT [void AdiFormat::writeField(QString, QString, QString):../QLog/logformat/AdiFormat.cpp:201]
where
-
14:35:17.363
- a timestamp -
[DEBUG ]
- a severity -
[0x7f05083d2440]
- Thread ID -
[qlog.logformat.adiformat.function.entered]
- logging category -
OUTPUT
- debug message -
[void AdiFormat::writeField(QString, QString, QString):../QLog/logformat/AdiFormat.cpp:201]
- source code entry
The Severity levels can be :
Critical
Debug
Info
Warning
The Logging Category specifies which part of the program the debug report was called from.
The above procedure will display all debug messages to the command line (except Windows platform). If saving debug messages to a file is required, it is necessary to run Qlog with the -d
switch, which will cause everything to be saved to a file qlog_debug_yyyyMMddhhmmss.log
in folder:
-
Linux -
$HOME/.local/share/hamradio/QLog
-
Linux - flatpak -
$HOME/.var/app/io.github.foldynl.QLog/data/hamradio/QLog
-
Windows -
C:/Users/<USER>/AppData/Local/hamradio/QLog
-
MacOS -
$HOME/library/Application support/hamradio/qlog