Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# loggingmacros.h File Reference

This header defines the logging macros. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | LOG4CPLUS_TRACE_METHOD(logger, logEvent) log4cplus::TraceLogger _log4cplus_trace_logger(logger, logEvent, __FILE__, __LINE__);
#define | LOG4CPLUS_TRACE(logger, logEvent)
| This macro creates a TraceLogger to log a TRACE_LOG_LEVEL message to `logger` upon entry and exiting of a method.
#define | LOG4CPLUS_TRACE_STR(logger, logEvent)
#define | LOG4CPLUS_DEBUG(logger, logEvent)
| This macro is used to log a DEBUG_LOG_LEVEL message to `logger`.
#define | LOG4CPLUS_DEBUG_STR(logger, logEvent)
#define | LOG4CPLUS_INFO(logger, logEvent)
| This macro is used to log a INFO_LOG_LEVEL message to `logger`.
#define | LOG4CPLUS_INFO_STR(logger, logEvent)
#define | LOG4CPLUS_WARN(logger, logEvent)
| This macro is used to log a WARN_LOG_LEVEL message to `logger`.
#define | LOG4CPLUS_WARN_STR(logger, logEvent)
#define | LOG4CPLUS_ERROR(logger, logEvent)
| This macro is used to log a ERROR_LOG_LEVEL message to `logger`.
#define | LOG4CPLUS_ERROR_STR(logger, logEvent)
#define | LOG4CPLUS_FATAL(logger, logEvent)
| This macro is used to log a FATAL_LOG_LEVEL message to `logger`.
#define | LOG4CPLUS_FATAL_STR(logger, logEvent)

## Detailed Description

This header defines the logging macros.

Definition in file loggingmacros.h.

## Define Documentation

#define LOG4CPLUS_DEBUG | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::DEBUG_LOG_LEVEL)) { \
                log4cplus::tostringstream _log4cplus_buf; \
                _log4cplus_buf << logEvent; \
                logger.forcedLog(log4cplus::DEBUG_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
            } \
        } while(0);
This macro is used to log a DEBUG_LOG_LEVEL message to `logger`. `logEvent` will be streamed into an `ostream`. Definition at line 72 of file loggingmacros.h.

#define LOG4CPLUS_DEBUG_STR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::DEBUG_LOG_LEVEL)) { \
                logger.forcedLog(log4cplus::DEBUG_LOG_LEVEL, logEvent, __FILE__, __LINE__); \
            } \
        } while(0);
Definition at line 80 of file loggingmacros.h.

#define LOG4CPLUS_ERROR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::ERROR_LOG_LEVEL)) { \
                log4cplus::tostringstream _log4cplus_buf; \
                _log4cplus_buf << logEvent; \
                logger.forcedLog(log4cplus::ERROR_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
            } \
        } while(0);
This macro is used to log a ERROR_LOG_LEVEL message to `logger`. `logEvent` will be streamed into an `ostream`. Definition at line 147 of file loggingmacros.h.

#define LOG4CPLUS_ERROR_STR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::ERROR_LOG_LEVEL)) { \
                logger.forcedLog(log4cplus::ERROR_LOG_LEVEL, logEvent, __FILE__, __LINE__); \
            } \
        } while(0);
Definition at line 155 of file loggingmacros.h.

#define LOG4CPLUS_FATAL | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::FATAL_LOG_LEVEL)) { \
                log4cplus::tostringstream _log4cplus_buf; \
                _log4cplus_buf << logEvent; \
                logger.forcedLog(log4cplus::FATAL_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
            } \
        } while(0);
This macro is used to log a FATAL_LOG_LEVEL message to `logger`. `logEvent` will be streamed into an `ostream`. Definition at line 172 of file loggingmacros.h.

#define LOG4CPLUS_FATAL_STR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::FATAL_LOG_LEVEL)) { \
                logger.forcedLog(log4cplus::FATAL_LOG_LEVEL, logEvent, __FILE__, __LINE__); \
            } \
        } while(0);
Definition at line 180 of file loggingmacros.h.

#define LOG4CPLUS_INFO | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::INFO_LOG_LEVEL)) { \
                log4cplus::tostringstream _log4cplus_buf; \
                _log4cplus_buf << logEvent; \
                logger.forcedLog(log4cplus::INFO_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
            } \
        } while(0);
This macro is used to log a INFO_LOG_LEVEL message to `logger`. `logEvent` will be streamed into an `ostream`. Definition at line 97 of file loggingmacros.h.

#define LOG4CPLUS_INFO_STR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::INFO_LOG_LEVEL)) { \
                logger.forcedLog(log4cplus::INFO_LOG_LEVEL, logEvent, __FILE__, __LINE__); \
            } \
        } while(0);
Definition at line 105 of file loggingmacros.h.

#define LOG4CPLUS_TRACE | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::TRACE_LOG_LEVEL)) { \
                log4cplus::tostringstream _log4cplus_buf; \
                _log4cplus_buf << logEvent; \
                logger.forcedLog(log4cplus::TRACE_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
            } \
        } while(0);
This macro creates a TraceLogger to log a TRACE_LOG_LEVEL message to `logger` upon entry and exiting of a method. `logEvent` will be streamed into an `ostream`. Definition at line 46 of file loggingmacros.h.

#define LOG4CPLUS_TRACE_METHOD | ( | logger,
|  | logEvent |  | ) | log4cplus::TraceLogger _log4cplus_trace_logger(logger, logEvent, __FILE__, __LINE__);

| Definition at line 44 of file loggingmacros.h.

#define LOG4CPLUS_TRACE_STR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::TRACE_LOG_LEVEL)) { \
                logger.forcedLog(log4cplus::TRACE_LOG_LEVEL, logEvent, __FILE__, __LINE__); \
            } \
        } while(0);
Definition at line 54 of file loggingmacros.h.

#define LOG4CPLUS_WARN | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::WARN_LOG_LEVEL)) { \
                log4cplus::tostringstream _log4cplus_buf; \
                _log4cplus_buf << logEvent; \
                logger.forcedLog(log4cplus::WARN_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
            } \
        } while(0);
This macro is used to log a WARN_LOG_LEVEL message to `logger`. `logEvent` will be streamed into an `ostream`. Definition at line 122 of file loggingmacros.h.

#define LOG4CPLUS_WARN_STR | ( | logger,
|  | logEvent |  | ) |

| Value:
    do { \
            if(logger.isEnabledFor(log4cplus::WARN_LOG_LEVEL)) { \
                logger.forcedLog(log4cplus::WARN_LOG_LEVEL, logEvent, __FILE__, __LINE__); \
            } \
        } while(0);
Definition at line 130 of file loggingmacros.h.