Class for managing log messages. More...
Public Member Functions | |
void | setLevel (const Str &loggerName, int logLevel) |
Sets the logging level of the named logger and all its descendants. More... | |
void | setDestination (LogDestination *logDestination) |
Sets log destination for all loggers. More... | |
void | logError (const Str &loggerName, const Str &errorMessage) |
Adds an error (level 1) log entry to the logger with the given name. More... | |
void | logError (const Str &loggerName, const Str &errorMessage, const CodeLocation &location) |
Adds an error (level 1) log entry to the logger with the given name. More... | |
void | logWarning (const Str &loggerName, const Str &warningMessage) |
Adds a warning (level 2) log entry to the logger with the given name. More... | |
void | logWarning (const Str &loggerName, const Str &warningMessage, const CodeLocation &location) |
Adds a warning (level 2) log entry to the logger with the given name. More... | |
void | logInfo (const Str &loggerName, const Str &infoMessage) |
Adds a info log (level 3) entry to the logger with the given name. More... | |
void | logInfo (const Str &loggerName, const Str &infoMessage, const CodeLocation &location) |
Adds a info log (level 3) entry to the logger with the given name. More... | |
void | logDebug (const Str &loggerName, const Str &debugMessage) |
Adds a debug (level 4) log entry to the logger with the given name. More... | |
void | logDebug (const Str &loggerName, const Str &debugMessage, const CodeLocation &location) |
Adds a debug (level 4) log entry to the logger with the given name. More... | |
void | logInfoForced (const Str &loggerName, const Str &infoMessage) |
Adds a info log entry to the logger with the given name regardless of the current log level. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Class for managing log messages.
The log manager receives errors, warnings, info and debug log messages and communicate these to the chosen log destination (file or console).
For more information, see the Logging topic.
Adds a debug (level 4) log entry to the logger with the given name.
void cee::LogManager::logDebug | ( | const Str & | loggerName, |
const Str & | debugMessage, | ||
const CodeLocation & | location | ||
) |
Adds a debug (level 4) log entry to the logger with the given name.
Adds an error (level 1) log entry to the logger with the given name.
void cee::LogManager::logError | ( | const Str & | loggerName, |
const Str & | errorMessage, | ||
const CodeLocation & | location | ||
) |
Adds an error (level 1) log entry to the logger with the given name.
Adds a info log (level 3) entry to the logger with the given name.
void cee::LogManager::logInfo | ( | const Str & | loggerName, |
const Str & | infoMessage, | ||
const CodeLocation & | location | ||
) |
Adds a info log (level 3) entry to the logger with the given name.
Adds a info log entry to the logger with the given name regardless of the current log level.
Adds a warning (level 2) log entry to the logger with the given name.
void cee::LogManager::logWarning | ( | const Str & | loggerName, |
const Str & | warningMessage, | ||
const CodeLocation & | location | ||
) |
Adds a warning (level 2) log entry to the logger with the given name.
void cee::LogManager::setDestination | ( | LogDestination * | logDestination | ) |
Sets log destination for all loggers.
void cee::LogManager::setLevel | ( | const Str & | loggerName, |
int | logLevel | ||
) |
Sets the logging level of the named logger and all its descendants.
Log levels are 1=error, 2=warning, 3=info and 4=debug. A log level of 0 disables all logging.