|
| Logger (int debugLevel=DebugLevel::WARNINGS) |
|
void | log (int debugLevel, const EG_CHAR *file, const EG_CHAR *function, bool printBrackets, unsigned int line, const EG_CHAR *dbgMsg,...) const |
|
void | vlog (int debugLevel, const EG_CHAR *file, const EG_CHAR *function, bool printBrackets, unsigned int line, const EG_CHAR *dbgMsg, va_list args) const |
|
int | getDebugOutputLevel (void) const |
|
bool | setDebugOutputLevel (int debugLevel) |
|
void | setListener (const BaseListener &listener) |
|
const LogFormatOptions & | getFormatOptions (void) const |
|
void | setFormatOptions (const LogFormatOptions &formatOptions) |
|
virtual Common::JString & | toString (Common::JString &retStr, bool withTypes=false) const |
|
virtual | ~ToString (void) |
|
virtual JString | typeToString (void) const |
|
JString | toString (bool withTypes=false) const |
|
A Logger instance works as debugging API to send formatted strings to its current listener instance via the EGLOG()-macro.
§ Logger()
Constructor: Creates a new Logger instance and sets the initial debug level.
- Parameters
-
debugLevel | the minimum debug level that a message must have to actually get logged by this Logger instance (the default is DebugLevel::WARNINGS) |
§ log()
void log |
( |
int |
debugLevel, |
|
|
const EG_CHAR * |
file, |
|
|
const EG_CHAR * |
function, |
|
|
bool |
printBrackets, |
|
|
unsigned int |
line, |
|
|
const EG_CHAR * |
dbgMsg, |
|
|
|
... |
|
) |
| const |
Not intended for direct use - you should use the EGLOG() macro instead!
§ vlog()
void vlog |
( |
int |
debugLevel, |
|
|
const EG_CHAR * |
file, |
|
|
const EG_CHAR * |
function, |
|
|
bool |
printBrackets, |
|
|
unsigned int |
line, |
|
|
const EG_CHAR * |
dbgMsg, |
|
|
va_list |
args |
|
) |
| const |
Not intended for direct use - you should use the EGLOG() macro instead!
§ getDebugOutputLevel()
int getDebugOutputLevel |
( |
void |
| ) |
const |
§ setDebugOutputLevel()
bool setDebugOutputLevel |
( |
int |
debugLevel | ) |
|
§ setListener()
Sets parameter "listener" as receiver for all debug output information, which gets logged by the Logger instance, on which this function has been called.
- Parameters
-
listener | a reference to an instance of a subclass of BaseListener |
- Returns
- true if the new debug level has been set correctly, false otherwise.
- See also
- getDebugOutputLevel()
§ getFormatOptions()
§ setFormatOptions()
Sets the log format options to the supplied value.
- Parameters
-
formatOptions | the new value to which the log format options will be set |
- See also
- getFormatOptions()
§ toString()
- Remarks
- The cost of this function depends a lot on implementation details of the implementing subclasses, but for container classes this function can become quite expensive, if the instance contains huge amounts of data, as its cost for many container class implementations increases disproportionately high to the size of the payload.
- Parameters
-
retStr | reference to a string, to store the return-value in; the information, which is generated by this function, will be attached at the end of any eventually existing previous content of the string |
withTypes | set to true, to include type information in the generated string |
- Returns
- a JString representation of the instance and its contents for debugging purposes.
Implements ToString.