#include <tlogger.h>
|
QStringConverter::Encoding | encoding () const |
|
QVariant | settingsValue (const QString &key, const QVariant &defaultValue=QVariant()) const |
|
The TLogger class provides an abstract base of logging functionality.
◆ TLogger()
◆ ~TLogger()
virtual TLogger::~TLogger |
( |
| ) |
|
|
inlinevirtual |
◆ close()
Closes the device.
This function should be called from any reimplementations of close().
Implemented in TStdOutLogger.
◆ dateTimeFormat()
const QByteArray & TLogger::dateTimeFormat |
( |
| ) |
const |
Returns a reference to the value for the setting datetime format.
◆ encoding()
QStringConverter::Encoding TLogger::encoding |
( |
| ) |
const |
|
protected |
Returns a pointer to QTextCodec of the default text encoding.
◆ flush()
Flushes any buffered data to the device.
This function should be called from any reimplementations of flush().
Reimplemented in TStdOutLogger.
◆ isMultiProcessSafe()
bool TLogger::isMultiProcessSafe |
( |
| ) |
const |
|
pure virtual |
Returns true if the implementation is guaranteed to be free of race conditions when accessed by multiple processes simultaneously; otherwise returns false.
Implemented in TStdOutLogger.
◆ isOpen()
bool TLogger::isOpen |
( |
| ) |
const |
|
pure virtual |
Returns true if the device is open; otherwise returns false.
This function should be called from any reimplementations of isOpen().
Implemented in TStdOutLogger.
◆ key()
QString TLogger::key |
( |
| ) |
const |
|
pure virtual |
Returns a key that this logger plugin supports.
Implemented in TStdOutLogger.
◆ layout()
const QByteArray & TLogger::layout |
( |
| ) |
const |
Returns a reference to the value for the setting layout.
◆ log() [1/2]
virtual void TLogger::log |
( |
const QByteArray & |
| ) |
|
|
pure virtual |
◆ log() [2/2]
void TLogger::log |
( |
const TLog & |
log | ) |
|
|
inlinevirtual |
Writes the log log to the device.
This function should be called from any reimplementations of log().
◆ logToByteArray() [1/2]
QByteArray TLogger::logToByteArray |
( |
const TLog & |
log | ) |
const |
|
virtual |
Converts the log log to its textual representation and returns a QByteArray containing the data.
◆ logToByteArray() [2/2]
QByteArray TLogger::logToByteArray |
( |
const TLog & |
log, |
|
|
const QByteArray & |
layout, |
|
|
const QByteArray & |
dateTimeFormat, |
|
|
QStringConverter::Encoding |
encoding = QStringConverter::Utf8 |
|
) |
| |
|
static |
Converts the log log to its textual representation and returns a QByteArray containing the data.
◆ open()
Opens the device for logging.
Returns true if successful; otherwise returns false. This function should be called from any reimplementations of open().
Implemented in TStdOutLogger.
◆ priorityToString()
Returns a QByteArray containing the priority priority.
◆ settingsValue()
QVariant TLogger::settingsValue |
( |
const QString & |
k, |
|
|
const QVariant & |
defaultValue = QVariant() |
|
) |
| const |
|
protected |
Returns the value for logger setting key.
If the setting doesn't exist, returns defaultValue.
◆ target()
const QString & TLogger::target |
( |
| ) |
const |
Returns a reference to the value for the setting target device.
◆ threshold()
Returns the value for the setting priority threshold.
The documentation for this class was generated from the following files: