|
static std::ostream & | debug (const char *logComponent, const char *sourceFileName, int lineNo, const char *functionName) |
| Logging functions for each log level. More...
|
|
static std::ostream & | milestone (const char *logComponent, const char *sourceFileName, int lineNo, const char *functionName) |
|
static std::ostream & | warning (const char *logComponent, const char *sourceFileName, int lineNo, const char *functionName) |
|
static std::ostream & | error (const char *logComponent, const char *sourceFileName, int lineNo, const char *functionName) |
|
static YUILog * | instance () |
| Return the singleton object for this class. More...
|
|
static void | enableDebugLogging (bool debugLogging=true) |
| Enable or disable debug logging.
|
|
static bool | debugLoggingEnabled () |
| Return 'true' if debug logging is enabled, 'false' if not.
|
|
static bool | setLogFileName (const std::string &logFileName) |
| Set the log file name to be used with the standard logger function. More...
|
|
static std::string | logFileName () |
| Return the current log file name or an empty string if stderr is used. More...
|
|
static void | setLoggerFunction (YUILoggerFunction loggerFunction) |
| Set the UI logger function. More...
|
|
static YUILoggerFunction | loggerFunction (bool returnStdLogger=false) |
| Return the UI logger function. More...
|
|
static void | setEnableDebugLoggingHooks (YUIEnableDebugLoggingFunction enableFunction, YUIDebugLoggingEnabledFunction isEnabledFunction) |
| Set the hook functions to enable/disable debug logging and to query if debug logging is enabled: More...
|
|
static YUIEnableDebugLoggingFunction | enableDebugLoggingHook () |
| Return the hook function that enables or disables debug logging or 0 if no such hook function is set.
|
|
static YUIDebugLoggingEnabledFunction | debugLoggingEnabledHook () |
| Return the hook function that checks if debug logging is enabled or 0 if no such hook function is set.
|
|
static std::string | basename (const std::string &fileNameWithPath) |
| Return the base name without path from a file name with path.
|
|
UI logging.
Definition at line 97 of file YUILog.h.
bool YUILog::setLogFileName |
( |
const std::string & |
logFileName | ) |
|
|
static |
Set the log file name to be used with the standard logger function.
Output will be appended to this file.
Until this file name is set, the standard logger function logs to stderr. Set the log file name to an empty string to log to stderr again.
This returns 'true' upon success (opening the file was successful), 'false' upon error.
Notice:
(1) This file name is only relevant as long as the standard logger function is used. Custom logger functions may or may not use this file name.
(2) No attempt is made to do anything fancy with the log file like log file rotation when a certain file size is reached. Applications that need this should use a custom logger function. See also setLoggerFunction().
Definition at line 344 of file YUILog.cc.
void YUILog::setLoggerFunction |
( |
YUILoggerFunction |
loggerFunction | ) |
|
|
static |
Set the UI logger function.
This is the function that will ultimately receive all UI log output (except debug logging if debug logging is disabled).
By default, all logging is output to stderr. This behaviour can be restored if 0 is passed as a function pointer here.
Definition at line 407 of file YUILog.cc.