#include <LogAppender.h>
|
static void | all (const Log &log) |
| Send a message to all existing appenders. More...
|
|
LogAppender::LogAppender |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
LogAppender::~LogAppender |
( |
| ) |
|
|
virtual |
void LogAppender::all |
( |
const Log & |
log | ) |
|
|
static |
Send a message to all existing appenders.
virtual const char* LogAppender::defaultFormat |
( |
| ) |
const |
|
protectedpure virtual |
virtual Log::Level LogAppender::defaultMinLevel |
( |
| ) |
const |
|
protectedpure virtual |
QString LogAppender::format |
( |
const Log & |
log | ) |
const |
|
protected |
Do the substtutions Use the string set by setFormat() to format the log
event.
void LogAppender::setFormat |
( |
const char * |
format | ) |
|
Set current formating.
How to format log line once appended. Default depends of the appender used (
- See also
- defaultFormat()). Setting a null string returns to the appender's default.
Valide substitutions are:
- o : log level (one of DEBUG, TRACE, INFO, THROW, WARNING, ERROR).
- d : log's date.
- t : log's time.
- f : source file where the error is logged (just trailling filename)
- F : source file where the error is logged (full path)
- l : source line where the error is logged.
- p : the function that fired the log message.
- m : the log message itself.
Typical usage:
LogAppenderMemory mem(0,0);
mem.setFormat("[%o] %f:%l %m");
...
LOG_TRACE("Here");
Filter messages by error level. Sets the minimum level to use for this appender. level
is one of:
- Log::LEVEL_DEBUG : The most verbose one, used only during debug session.
- Log::LEVEL_TRACE : Messages to be put in silent log files, for post-mortem analysis.
- Log::LEVEL_INFO : General information send to the final user.
- Log::LEVEL_WARNING : Error reported to the user (eg. with a Qt warning box.
- See also
- LogAppenderWindow).
- Log::LEVEL_THROW : Error that is mean to be catched, and corrected automatically.
- Log::LEVEL_ERROR : Fatal error that cannot be recovered. The program should halt.
The default depends from the appender.
virtual const char* LogAppender::type |
( |
| ) |
const |
|
protectedpure virtual |
Log::close() needs an access to the list, to remove all appenders.
QByteArray LogAppender::_format |
|
protected |
How to dislay logged data ?
The documentation for this class was generated from the following files: