![]() |
OSTC Companion
3.0
Companion sofftware for H&W dive computers
|
Basic logging tool. More...
#include <Log.h>

Protected Member Functions | |
| Log (Level level, const char *file, int line, const char *function) | |
| Constructor. More... | |
Record message and context | |
| enum | Level { LEVEL_NOERROR = 0, LEVEL_DEBUG, LEVEL_TRACE, LEVEL_INFO, LEVEL_WARNING, LEVEL_THROW, LEVEL_ERROR } |
| Log level: severity scale. More... | |
| const Level | level |
| Event's log level. More... | |
| const QString | file |
| Source file that fired the log event. More... | |
| const int | line |
| Source line that fired the log event. More... | |
| const QString | function |
| Function (and class) that fired the event. More... | |
| QString | message |
| The log message itself. More... | |
Global services | |
| static Level | minLevel = Log::LEVEL_WARNING |
| Minimal error level to log. More... | |
| static void | autoLoad (int argc, char *argv[]) |
| Initialize the log system, by loading some XML config. More... | |
| static void | init (int &argc, char *argv[]) |
| Initialize the log system, without configurations. More... | |
| static void | close () |
| End the log systems, closing all appenders. More... | |
| static QString | applicationPath () |
| Utility to retrieve where the executable was installed. More... | |
| static QString | applicationName () |
| Utility to retrieve the executable's name. More... | |
Basic logging tool.
Provides easy and centralized log messages for the application. Typical usage:
| enum Log::Level |
Log level: severity scale.
|
protected |
Constructor.
All message are to be created by a LogAction instance, responsible to build-up the message, and to send it to LogAppender instances.
|
inlinestatic |
Utility to retrieve the executable's name.
|
inlinestatic |
Utility to retrieve where the executable was installed.
|
static |
Initialize the log system, by loading some XML config.
Might be used to change logging configuration of installed applications. Initialize the log system, by loading some XML config.
|
static |
End the log systems, closing all appenders.
|
static |
Initialize the log system, without configurations.
Then one can instanciate LogAppender classes in a static way.
| const QString Log::file |
Source file that fired the log event.
| const QString Log::function |
Function (and class) that fired the event.
| const Level Log::level |
Event's log level.
| const int Log::line |
Source line that fired the log event.
| QString Log::message |
The log message itself.
|
static |
Minimal error level to log.
Defaults to LEVEL_TRACE.
1.8.8