31 # pragma warning (push, 3) 32 # pragma warning(disable:4706) // assignment within conditional expression 42 #include <Log/ILogger.h> 43 #include <Log/ILoggerFactory.h> 58 static bool Exist(
const gcstring &LoggerName);
59 static bool Exist(
const char* LoggerName);
64 static ILogger& GetLogger(
const gcstring &LoggerName);
65 static ILogger& GetLogger(
const char* LoggerName);
67 static void PushIndent();
68 static void PopIndent();
71 static void OmitLogger();
74 static void SetLoggerFactory(ILoggerFactory&);
75 static void SetLoggerFactory(ILoggerFactory* pLoggerFactory);
76 static ILoggerFactory* GetLoggerFactory();
79 static void ShutDown(
void);
85 typedef HMODULE lib_handle_t;
87 typedef void * lib_handle_t;
91 static void DefaultInitializer();
94 static lib_handle_t OpenLibrary(
const gcstring Name);
97 static void *FindSymbol(lib_handle_t Handle,
const gcstring Name);
100 static void MakeSureLoggerHasBeenFound();
102 static bool ExistInMap(
gcstring loggerName);
104 static void DeleteLoggerMap();
107 static ILoggerFactory* m_LogFactory;
112 static lib_handle_t g_pLibHandle;
115 static bool m_LoggerHasBeenFound;
116 static bool m_OmitLogger;
122 #if defined(__GNUC__) 123 # pragma GCC diagnostic push 124 # pragma GCC diagnostic ignored "-Wvariadic-macros" 125 # if defined(__clang__) 126 # pragma GCC diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" 131 #define GCLOGINFO( cat, ... ) if(cat && GENICAM_NAMESPACE::CLog::Exist("")) { (cat)->Log(GENICAM_NAMESPACE::ILogger::INFO, ##__VA_ARGS__ ); } 132 #define GCLOGINFOPUSH( cat, ... ) if(cat && GENICAM_NAMESPACE::CLog::Exist("")) { (cat)->Log(GENICAM_NAMESPACE::ILogger::INFO, ##__VA_ARGS__ ); GENICAM_NAMESPACE::CLog::PushIndent();} 133 #define GCLOGWARN( cat, ... ) if(cat && GENICAM_NAMESPACE::CLog::Exist("")) { (cat)->Log(GENICAM_NAMESPACE::ILogger::WARN, ##__VA_ARGS__ ); } 134 #define GCLOGERROR( cat, ... ) if(cat && GENICAM_NAMESPACE::CLog::Exist("")) { (cat)->Log(GENICAM_NAMESPACE::ILogger::ERR, ##__VA_ARGS__ ); } 135 #define GCLOGDEBUG( cat, ... ) if(cat && GENICAM_NAMESPACE::CLog::Exist("")) { (cat)->Log(GENICAM_NAMESPACE::ILogger::DEBUG, ##__VA_ARGS__ ); } 136 #define GCLOGINFOPOP( cat, ... ) if(cat && GENICAM_NAMESPACE::CLog::Exist("")) { (cat)->Log(GENICAM_NAMESPACE::ILogger::INFO, ##__VA_ARGS__ ); GENICAM_NAMESPACE::CLog::PopIndent();} 139 #if defined(__GNUC__) 140 # pragma GCC diagnostic pop 143 #endif // LOG_CLOG_H_ Common GenICam base include file.
declspec's to be used for Log Windows dll
A string class which is a clone of std::string.
Definition: GCString.h:50
This logging class initializes the logger. By default that would be Log4cpp.
Definition: CLog.h:52