The logging class reports messages to the programmer via a policy.
The logging class defaults to the console logging policy, which means that information is redirected to the systems console, if available. For Windows, the default console is the default command shell; note that for some programs, the program output should be redirected to a file as reporting may happen through other temporary shells created by the application.
When logging on the Android platform, the CYIAndroidPolicy class will be used by default.
When logging on an Apple platform, the CYIApplePolicy class will be used by default.
#include <logging/YiLogger.h>
Public Member Functions | |
| CYILogger () | |
| CYILogger (const char *pModuleName, const char *pPrettyFunction, uint32_t unLineNumber, const CYIString &rTagName, YI_LOG_SEVERITY eSeverity, const char *pLogMessage,...) | |
| CYILogger (const char *pModuleName, const char *pPrettyFunction, uint32_t unLineNumber, const CYIString &rTagName, YI_LOG_SEVERITY eSeverity, const char *pLogMessage, va_list varArgPtr) | |
| CYILogger (const char *pModuleName, const char *pPrettyFunction, uint32_t unLineNumber, const std::string &rTagName, YI_LOG_SEVERITY eSeverity, const char *pLogMessage, va_list varArgPtr) | |
| CYILogger (const char *pModuleName, const char *pPrettyFunction, uint32_t unLineNumber, const char *pTagName, YI_LOG_SEVERITY eSeverity, const char *pLogMessage, va_list varArgPtr) | |
| ~CYILogger () | |
Static Public Member Functions | |
| static std::shared_ptr< CYILogPolicy > | CreateDefaultLogPolicy () |
| static void | SetLogPolicy (const std::shared_ptr< CYILogPolicy > &pPolicy) |
| static const std::shared_ptr< CYILogPolicy > & | GetLogPolicy () |
| static const std::shared_ptr< CYIPreferences > & | GetPreferences () |
| static void | SetPreferences (const std::shared_ptr< CYIPreferences > &pPrefs) |
| static void | SetLoggingEnabled (bool bEnabled) |
Friends | |
| class | CYILoggerPriv |
| CYILogger::CYILogger | ( | ) |
Default constructor; use this constructor to configure the logger.
| CYILogger::CYILogger | ( | const char * | pModuleName, |
| const char * | pPrettyFunction, | ||
| uint32_t | unLineNumber, | ||
| const CYIString & | rTagName, | ||
| YI_LOG_SEVERITY | eSeverity, | ||
| const char * | pLogMessage, | ||
| ... | |||
| ) |
Overloaded constructor used by the YI_LOG* macros.
| CYILogger::CYILogger | ( | const char * | pModuleName, |
| const char * | pPrettyFunction, | ||
| uint32_t | unLineNumber, | ||
| const CYIString & | rTagName, | ||
| YI_LOG_SEVERITY | eSeverity, | ||
| const char * | pLogMessage, | ||
| va_list | varArgPtr | ||
| ) |
Overloaded constructor used by the YI_LOG* macros.
| CYILogger::CYILogger | ( | const char * | pModuleName, |
| const char * | pPrettyFunction, | ||
| uint32_t | unLineNumber, | ||
| const std::string & | rTagName, | ||
| YI_LOG_SEVERITY | eSeverity, | ||
| const char * | pLogMessage, | ||
| va_list | varArgPtr | ||
| ) |
Overloaded constructor used by the YI_LOG* macros.
| CYILogger::CYILogger | ( | const char * | pModuleName, |
| const char * | pPrettyFunction, | ||
| uint32_t | unLineNumber, | ||
| const char * | pTagName, | ||
| YI_LOG_SEVERITY | eSeverity, | ||
| const char * | pLogMessage, | ||
| va_list | varArgPtr | ||
| ) |
Overloaded constructor used by the YI_LOG* macros.
| CYILogger::~CYILogger | ( | ) |
Destructor.
|
static |
|
static |
Returns the currently-assigned log policy.
|
static |
Returns the current set of preferences.
|
static |
Enables or disables the logging service.
|
static |
Set the log policy, pPolicy, to use with this logger.
|
static |
Accepts a new set of preferences for logging.
See CYILogPolicy class documentation for further detail regarding logging preferences.
|
friend |