Helper class encapsulating log4cpp. More...
#include <CLog.h>
Static Public Member Functions | |
static void | AddAppender (LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Appender *aAppender) |
Add/remove an appender to/from a category. | |
static void | ConfigureDefault () |
Configures log4cpp to output messages >=ERROR on the Windows debug console. | |
static bool | ConfigureFromEnvironment (void) |
Configures log4cpp from a file whose name is given by the environment variable GENICAM_LOG_CONFIG_VERSION. | |
static bool | ConfigureFromFile (const gcstring &FileName) |
Configures log4cpp from a file. | |
static bool | ConfigureFromFile (const char FileName[]) |
static bool | ConfigureFromString (const gcstring &ConfigData) |
Configures log4cpp from a string. | |
static bool | ConfigureFromString (const char ConfigData[]) |
static LOG4CPP_NS::Appender * | CreateFileAppender (const gcstring &aName, const gcstring &aPath, bool aAppend=false, const gcstring &aPattern="") |
Creates a new file appender (used by some test modules) | |
static bool | Exists (const gcstring &LoggerName) |
Checks if a category exists. | |
static bool | Exists (const char LoggerName[]) |
static LOG4CPP_NS::Category & | GetLogger (const gcstring &LoggerName) |
Retrieves (and if necessary create) a category by name. | |
static LOG4CPP_NS::Category & | GetLogger (const char LoggerName[]) |
static LOG4CPP_NS::Category & | GetRootLogger (void) |
Retrieves the root category. | |
static void | Initialize (void) |
initializes log4cpp | |
static bool | IsDebugEnabled (LOG4CPP_NS::Category *aCategory) |
static bool | IsInfoEnabled (LOG4CPP_NS::Category *aCategory) |
Check whether logging is possible and enabled for a specific category. | |
static bool | IsWarnEnabled (LOG4CPP_NS::Category *aCategory) |
static void | Log (LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority, const char *aStringFormat,...) |
static void | LogPop (LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority, const char *aStringFormat,...) |
static void | LogPush (LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority, const char *aStringFormat,...) |
Logging functions. | |
static void | LogVA (LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority, const char *aStringFormat, va_list arg) |
static void | PopNDC (void) |
Pop nested diagnostic context. | |
static void | PushNDC (const gcstring &ContextName) |
Push nested diagnostic context. | |
static void | PushNDC (const char ContextName[]) |
static void | RemoveAllAppenders (void) |
removes all appenders from all existing categories | |
static void | RemoveAppender (LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Appender *aAppender) |
static void | SetPriorityError (LOG4CPP_NS::Category *aCategory) |
static void | SetPriorityInfo (LOG4CPP_NS::Category *aCategory) |
Set priority for a category. | |
static void | ShutDown (void) |
de-initializes log4cpp | |
Private Types | |
typedef void * | lib_handle_t |
A type corresponds to a library handle which can be platform specific. | |
Static Private Member Functions | |
static void * | FindSymbol (lib_handle_t Handle, const gcstring Name) |
Finds a symbol and return its pointer. | |
static void | MakeSureLoggerHasBeenFound (void) |
Makes sure log4cpp has been found. | |
static lib_handle_t | OpenLibrary (const gcstring Name) |
Opens a library. | |
Static Private Attributes | |
static bool | g_HasFoundLogger |
A truth value of a proposition "Has found log4cpp.". | |
static lib_handle_t | g_pLibHandle |
A handle to an associated logger library. | |
static const void * | g_pLog4cpp |
A wrapper which bridges log4cpp and this class. | |
static int | g_RefCount |
Reference counter for Initialize/Shutdown. |
typedef void* GENICAM_NAMESPACE::CLog::lib_handle_t [private] |
static void GENICAM_NAMESPACE::CLog::AddAppender | ( | LOG4CPP_NS::Category * | aCategory, |
LOG4CPP_NS::Appender * | aAppender | ||
) | [static] |
Add/remove an appender to/from a category.
static void GENICAM_NAMESPACE::CLog::ConfigureDefault | ( | ) | [static] |
Configures log4cpp to output messages >=ERROR on the Windows debug console.
static bool GENICAM_NAMESPACE::CLog::ConfigureFromEnvironment | ( | void | ) | [static] |
Configures log4cpp from a file whose name is given by the environment variable GENICAM_LOG_CONFIG_VERSION.
static bool GENICAM_NAMESPACE::CLog::ConfigureFromFile | ( | const gcstring & | FileName | ) | [static] |
Configures log4cpp from a file.
static bool GENICAM_NAMESPACE::CLog::ConfigureFromFile | ( | const char | FileName[] | ) | [static] |
static bool GENICAM_NAMESPACE::CLog::ConfigureFromString | ( | const gcstring & | ConfigData | ) | [static] |
Configures log4cpp from a string.
static bool GENICAM_NAMESPACE::CLog::ConfigureFromString | ( | const char | ConfigData[] | ) | [static] |
static LOG4CPP_NS::Appender* GENICAM_NAMESPACE::CLog::CreateFileAppender | ( | const gcstring & | aName, |
const gcstring & | aPath, | ||
bool | aAppend = false , |
||
const gcstring & | aPattern = "" |
||
) | [static] |
Creates a new file appender (used by some test modules)
static bool GENICAM_NAMESPACE::CLog::Exists | ( | const gcstring & | LoggerName | ) | [static] |
Checks if a category exists.
static bool GENICAM_NAMESPACE::CLog::Exists | ( | const char | LoggerName[] | ) | [static] |
static void* GENICAM_NAMESPACE::CLog::FindSymbol | ( | lib_handle_t | Handle, |
const gcstring | Name | ||
) | [static, private] |
Finds a symbol and return its pointer.
static LOG4CPP_NS::Category& GENICAM_NAMESPACE::CLog::GetLogger | ( | const gcstring & | LoggerName | ) | [static] |
Retrieves (and if necessary create) a category by name.
static LOG4CPP_NS::Category& GENICAM_NAMESPACE::CLog::GetLogger | ( | const char | LoggerName[] | ) | [static] |
static LOG4CPP_NS::Category& GENICAM_NAMESPACE::CLog::GetRootLogger | ( | void | ) | [static] |
Retrieves the root category.
static void GENICAM_NAMESPACE::CLog::Initialize | ( | void | ) | [static] |
initializes log4cpp
static bool GENICAM_NAMESPACE::CLog::IsDebugEnabled | ( | LOG4CPP_NS::Category * | aCategory | ) | [static] |
static bool GENICAM_NAMESPACE::CLog::IsInfoEnabled | ( | LOG4CPP_NS::Category * | aCategory | ) | [static] |
Check whether logging is possible and enabled for a specific category.
static bool GENICAM_NAMESPACE::CLog::IsWarnEnabled | ( | LOG4CPP_NS::Category * | aCategory | ) | [static] |
static void GENICAM_NAMESPACE::CLog::Log | ( | LOG4CPP_NS::Category * | aCategory, |
LOG4CPP_NS::Priority::Value | aPriority, | ||
const char * | aStringFormat, | ||
... | |||
) | [static] |
static void GENICAM_NAMESPACE::CLog::LogPop | ( | LOG4CPP_NS::Category * | aCategory, |
LOG4CPP_NS::Priority::Value | aPriority, | ||
const char * | aStringFormat, | ||
... | |||
) | [static] |
static void GENICAM_NAMESPACE::CLog::LogPush | ( | LOG4CPP_NS::Category * | aCategory, |
LOG4CPP_NS::Priority::Value | aPriority, | ||
const char * | aStringFormat, | ||
... | |||
) | [static] |
Logging functions.
static void GENICAM_NAMESPACE::CLog::LogVA | ( | LOG4CPP_NS::Category * | aCategory, |
LOG4CPP_NS::Priority::Value | aPriority, | ||
const char * | aStringFormat, | ||
va_list | arg | ||
) | [static] |
static void GENICAM_NAMESPACE::CLog::MakeSureLoggerHasBeenFound | ( | void | ) | [static, private] |
Makes sure log4cpp has been found.
static lib_handle_t GENICAM_NAMESPACE::CLog::OpenLibrary | ( | const gcstring | Name | ) | [static, private] |
Opens a library.
static void GENICAM_NAMESPACE::CLog::PopNDC | ( | void | ) | [static] |
Pop nested diagnostic context.
static void GENICAM_NAMESPACE::CLog::PushNDC | ( | const gcstring & | ContextName | ) | [static] |
Push nested diagnostic context.
static void GENICAM_NAMESPACE::CLog::PushNDC | ( | const char | ContextName[] | ) | [static] |
static void GENICAM_NAMESPACE::CLog::RemoveAllAppenders | ( | void | ) | [static] |
removes all appenders from all existing categories
static void GENICAM_NAMESPACE::CLog::RemoveAppender | ( | LOG4CPP_NS::Category * | aCategory, |
LOG4CPP_NS::Appender * | aAppender | ||
) | [static] |
static void GENICAM_NAMESPACE::CLog::SetPriorityError | ( | LOG4CPP_NS::Category * | aCategory | ) | [static] |
static void GENICAM_NAMESPACE::CLog::SetPriorityInfo | ( | LOG4CPP_NS::Category * | aCategory | ) | [static] |
Set priority for a category.
static void GENICAM_NAMESPACE::CLog::ShutDown | ( | void | ) | [static] |
de-initializes log4cpp
bool GENICAM_NAMESPACE::CLog::g_HasFoundLogger [static, private] |
lib_handle_t GENICAM_NAMESPACE::CLog::g_pLibHandle [static, private] |
const void* GENICAM_NAMESPACE::CLog::g_pLog4cpp [static, private] |
int GENICAM_NAMESPACE::CLog::g_RefCount [static, private] |