35 # pragma warning (push, 3) 36 # pragma warning(disable:4706) // assignment within conditional expression 71 static bool Exists(
const gcstring &LoggerName );
72 static bool Exists(
const char LoggerName[] );
75 static void PushNDC(
const gcstring &ContextName );
76 static void PushNDC(
const char ContextName[] );
79 static void PopNDC(
void );
82 static void Initialize(
void );
85 static void ShutDown(
void );
88 static void ConfigureDefault();
91 static bool ConfigureFromFile(
const gcstring &FileName );
92 static bool ConfigureFromFile(
const char FileName[] );
95 static bool ConfigureFromEnvironment(
void );
98 static bool ConfigureFromString(
const gcstring &ConfigData );
99 static bool ConfigureFromString(
const char ConfigData[] );
102 static void RemoveAllAppenders(
void);
105 static LOG4CPP_NS::Appender *CreateFileAppender(
const gcstring &aName,
const gcstring &aPath,
bool aAppend =
false,
const gcstring &aPattern =
"" );
123 static void LogPush(
LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority,
const char *aStringFormat, ... );
124 static void LogPop(
LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority,
const char *aStringFormat, ... );
125 static void Log(
LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority,
const char *aStringFormat, ... );
126 static void LogVA(
LOG4CPP_NS::Category *aCategory, LOG4CPP_NS::Priority::Value aPriority,
const char *aStringFormat, va_list arg );
130 static void MakeSureLoggerHasBeenFound(
void );
149 static lib_handle_t OpenLibrary(
const gcstring Name );
152 static void *FindSymbol( lib_handle_t Handle,
const gcstring Name );
162 #define GCLOGINFO( cat, ... ) if(GENICAM_NAMESPACE::CLog::Exists("")) { GENICAM_NAMESPACE::CLog::Log( cat, LOG4CPP_NS::Priority::INFO, ##__VA_ARGS__ ); } 163 #define GCLOGINFOPUSH( cat, ... ) if(GENICAM_NAMESPACE::CLog::Exists("")) { GENICAM_NAMESPACE::CLog::LogPush( cat, LOG4CPP_NS::Priority::INFO, ##__VA_ARGS__ ); } 164 #define GCLOGINFOPOP( cat, ... ) if(GENICAM_NAMESPACE::CLog::Exists("")) { GENICAM_NAMESPACE::CLog::LogPop( cat, LOG4CPP_NS::Priority::INFO, ##__VA_ARGS__ ); } 165 #define GCLOGWARN( cat, ... ) if(GENICAM_NAMESPACE::CLog::Exists("")) { GENICAM_NAMESPACE::CLog::Log( cat, LOG4CPP_NS::Priority::WARN, ##__VA_ARGS__ ); } 166 #define GCLOGERROR( cat, ... ) if(GENICAM_NAMESPACE::CLog::Exists("")) { GENICAM_NAMESPACE::CLog::Log( cat, LOG4CPP_NS::Priority::ERROR, ##__VA_ARGS__ ); } 167 #define GCLOGDEBUG( cat, ... ) if(GENICAM_NAMESPACE::CLog::Exists("")) { GENICAM_NAMESPACE::CLog::Log( cat, LOG4CPP_NS::Priority::DEBUG, ##__VA_ARGS__ ); } 169 #endif // LOG_CLOG_H_ void * lib_handle_t
A type corresponds to a library handle which can be platform specific.
static lib_handle_t g_pLibHandle
A handle to an associated logger library.
static bool g_HasFoundLogger
A truth value of a proposition "Has found log4cpp.".
LOG4CPP_NS_BEGIN class LOG4CPP_EXPORT Category
Common GenICam base include file.
static const void * g_pLog4cpp
A wrapper which bridges log4cpp and this class.
declspec's to be used for Log Windows dll
This is the central class in the log4j package.
A string class which is a clone of std::string.
static int g_RefCount
Reference counter for Initialize/Shutdown.
Implement this interface for your own strategies for printing log statements.
Helper class encapsulating log4cpp.