convenience.h
Go to the documentation of this file.
1 #ifndef LOG4CPP_CONVENIENCE_H
2 #define LOG4CPP_CONVENIENCE_H
3 
4 #define LOG4CPP_LOGGER(name) \
5  static log4cpp::Category& logger = log4cpp::Category::getInstance( name );
6 
7 #define LOG4CPP_LOGGER_N(var_name, name) \
8  static log4cpp::Category& var_name = log4cpp::Category::getInstance( name );
9 
10 // simple logging
11 #define LOG4CPP_EMERG(logger, msg) \
12  if (logger.isEmergEnabled()) logger.emerg( msg );
13 
14 #define LOG4CPP_FATAL(logger, msg) \
15  if (logger.isFatalEnabled()) logger.fatal( msg );
16 
17 #define LOG4CPP_ALERT(logger, msg) \
18  if (logger.isAlertEnabled()) logger.alert( msg );
19 
20 #define LOG4CPP_CRIT(logger, msg) \
21  if (logger.isCritEnabled()) logger.crit( msg );
22 
23 #define LOG4CPP_ERROR(logger, msg) \
24  if (logger.isErrorEnabled()) logger.error( msg );
25 
26 #define LOG4CPP_GCLOG_WARN(logger, msg) \
27  if (logger.isWarnEnabled()) logger.warn( msg );
28 
29 #define LOG4CPP_NOTICE(logger, msg) \
30  if (logger.isNoticeEnabled()) logger.notice( msg );
31 
32 #define LOG4CPP_GCLOG_INFO(logger, msg) \
33  if (logger.isInfoEnabled()) logger.info( msg );
34 
35 #define LOG4CPP_GCLOG_DEBUG(logger, msg) \
36  if (logger.isDebugEnabled()) logger.debug( msg );
37 
38 
39 // stream logging
40 #define LOG4CPP_EMERG_S(logger) \
41  if (logger.isEmergEnabled()) logger.emergStream()
42 
43 #define LOG4CPP_FATAL_S(logger) \
44  if (logger.isFatalEnabled()) logger.fatalStream()
45 
46 #define LOG4CPP_ALERT_S(logger) \
47  if (logger.isAlertEnabled()) logger.alertStream()
48 
49 #define LOG4CPP_CRIT_S(logger) \
50  if (logger.isCritEnabled()) logger.critStream()
51 
52 #define LOG4CPP_ERROR_S(logger) \
53  if (logger.isErrorEnabled()) logger.errorStream()
54 
55 #define LOG4CPP_WARN_S(logger) \
56  if (logger.isWarnEnabled()) logger.warnStream()
57 
58 #define LOG4CPP_NOTICE_S(logger) \
59  if (logger.isNoticeEnabled()) logger.noticeStream()
60 
61 #define LOG4CPP_INFO_S(logger) \
62  if (logger.isInfoEnabled()) logger.infoStream()
63 
64 #define LOG4CPP_DEBUG_S(logger) \
65  if (logger.isDebugEnabled()) logger.debugStream()
66 
67 
68 // stream logging with default logger "logger"
69 #define LOG4CPP_EMERG_SD() \
70  if (logger.isEmergEnabled()) logger.emergStream()
71 
72 #define LOG4CPP_FATAL_SD() \
73  if (logger.isFatalEnabled()) logger.fatalStream()
74 
75 #define LOG4CPP_ALERT_SD() \
76  if (logger.isAlertEnabled()) logger.alertStream()
77 
78 #define LOG4CPP_CRIT_SD() \
79  if (logger.isCritEnabled()) logger.critStream()
80 
81 #define LOG4CPP_ERROR_SD() \
82  if (logger.isErrorEnabled()) logger.errorStream()
83 
84 #define LOG4CPP_WARN_SD() \
85  if (logger.isWarnEnabled()) logger.warnStream()
86 
87 #define LOG4CPP_NOTICE_SD() \
88  if (logger.isNoticeEnabled()) logger.noticeStream()
89 
90 #define LOG4CPP_INFO_SD() \
91  if (logger.isInfoEnabled()) logger.infoStream()
92 
93 #define LOG4CPP_DEBUG_SD() \
94  if (logger.isDebugEnabled()) logger.debugStream()
95 
96 #endif
97 


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40