Static Public Member Functions | Private Types | Static Private Member Functions | Static Private Attributes | List of all members
GENICAM_NAMESPACE::CLog Class Reference

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. More...
 
static void ConfigureDefault ()
 Configures log4cpp to output messages >=ERROR on the Windows debug console. More...
 
static bool ConfigureFromEnvironment (void)
 Configures log4cpp from a file whose name is given by the environment variable GENICAM_LOG_CONFIG_VERSION. More...
 
static bool ConfigureFromFile (const gcstring &FileName)
 Configures log4cpp from a file. More...
 
static bool ConfigureFromFile (const char FileName[])
 
static bool ConfigureFromString (const gcstring &ConfigData)
 Configures log4cpp from a string. More...
 
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) More...
 
static bool Exists (const gcstring &LoggerName)
 Checks if a category exists. More...
 
static bool Exists (const char LoggerName[])
 
static LOG4CPP_NS::CategoryGetLogger (const gcstring &LoggerName)
 Retrieves (and if necessary create) a category by name. More...
 
static LOG4CPP_NS::CategoryGetLogger (const char LoggerName[])
 
static LOG4CPP_NS::CategoryGetRootLogger (void)
 Retrieves the root category. More...
 
static void Initialize (void)
 initializes log4cpp More...
 
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. More...
 
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. More...
 
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. More...
 
static void PushNDC (const gcstring &ContextName)
 Push nested diagnostic context. More...
 
static void PushNDC (const char ContextName[])
 
static void RemoveAllAppenders (void)
 removes all appenders from all existing categories More...
 
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. More...
 
static void ShutDown (void)
 de-initializes log4cpp More...
 

Private Types

typedef void * lib_handle_t
 A type corresponds to a library handle which can be platform specific. More...
 

Static Private Member Functions

static void * FindSymbol (lib_handle_t Handle, const gcstring Name)
 Finds a symbol and return its pointer. More...
 
static void MakeSureLoggerHasBeenFound (void)
 Makes sure log4cpp has been found. More...
 
static lib_handle_t OpenLibrary (const gcstring Name)
 Opens a library. More...
 

Static Private Attributes

static bool g_HasFoundLogger
 A truth value of a proposition "Has found log4cpp.". More...
 
static lib_handle_t g_pLibHandle
 A handle to an associated logger library. More...
 
static const void * g_pLog4cpp
 A wrapper which bridges log4cpp and this class. More...
 
static int g_RefCount
 Reference counter for Initialize/Shutdown. More...
 

Detailed Description

Helper class encapsulating log4cpp.

Definition at line 59 of file CLog.h.

Member Typedef Documentation

A type corresponds to a library handle which can be platform specific.

Definition at line 142 of file CLog.h.

Member Function Documentation

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 
)
staticprivate

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  )
staticprivate

Makes sure log4cpp has been found.

static lib_handle_t GENICAM_NAMESPACE::CLog::OpenLibrary ( const gcstring  Name)
staticprivate

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

Member Data Documentation

bool GENICAM_NAMESPACE::CLog::g_HasFoundLogger
staticprivate

A truth value of a proposition "Has found log4cpp.".

Definition at line 155 of file CLog.h.

lib_handle_t GENICAM_NAMESPACE::CLog::g_pLibHandle
staticprivate

A handle to an associated logger library.

Definition at line 146 of file CLog.h.

const void* GENICAM_NAMESPACE::CLog::g_pLog4cpp
staticprivate

A wrapper which bridges log4cpp and this class.

Definition at line 136 of file CLog.h.

int GENICAM_NAMESPACE::CLog::g_RefCount
staticprivate

Reference counter for Initialize/Shutdown.

Definition at line 133 of file CLog.h.


The documentation for this class was generated from the following file:


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:56