Photon C++ Client API
5.0.7.3
|
Public Member Functions | |
Logger (int debugLevel=DebugLevel::WARNINGS) | |
virtual | ~Logger (void) |
bool | operator== (const Logger &toCompare) const |
bool | operator!= (const Logger &toCompare) const |
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 JString & | toString (JString &retStr, bool withTypes=false) const=0 |
JString | toString (bool withTypes=false) const |
Public Member Functions inherited from ToString | |
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 | ( | int | debugLevel = DebugLevel::WARNINGS | ) |
Constructor: Creates a new Logger instance and sets the initial debug level.
debugLevel | the minimum debug level that a message must have to actually get logged by this Logger instance (the default is DebugLevel::WARNINGS) |
|
virtual |
Destructor.
bool operator== | ( | const Logger & | toCompare | ) | const |
operator==.
bool operator!= | ( | const Logger & | toCompare | ) | const |
operator!=.
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!
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!
int getDebugOutputLevel | ( | void | ) | const |
Returns the current level of debug information that's passed on to BaseListener::debugReturn().
bool setDebugOutputLevel | ( | int | debugLevel | ) |
Sets the current level of debug information that's passed on to BaseListener::debugReturn().
debugLevel | one of the values in DebugLevel |
void setListener | ( | const BaseListener & | listener | ) |
Sets parameter "listener" as receiver for all debug output information, which gets logged by the Logger instance, on which this function has been called.
listener | a reference to an instance of a subclass of BaseListener |
const LogFormatOptions & getFormatOptions | ( | void | ) | const |
void setFormatOptions | ( | const LogFormatOptions & | formatOptions | ) |
Sets the log format options to the supplied value.
formatOptions | the new value to which the log format options will be set |
|
virtual |
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 |
Implements ToString.
toString |
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 |
JString toString |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
withTypes | set to true, to include type information in the generated string |