Logging macros

## Macros

#define | LOG4CXX_UNLIKELY(expr) expr
| Provides optimization hint to the compiler to optimize for the expression being false. More...
#define | LOG4CXX_LOG(logger, level, message)
| Logs a message to a specified logger with a specified level. More...
#define | LOG4CXX_LOGLS(logger, level, message)
| Logs a message to a specified logger with a specified level. More...
#define | LOG4CXX_DEBUG(logger, message)
| Logs a message to a specified logger with the DEBUG level. More...
#define | LOG4CXX_TRACE(logger, message)
| Logs a message to a specified logger with the TRACE level. More...
#define | LOG4CXX_INFO(logger, message)
| Logs a message to a specified logger with the INFO level. More...
#define | LOG4CXX_WARN(logger, message)
| Logs a message to a specified logger with the WARN level. More...
#define | LOG4CXX_ERROR(logger, message)
| Logs a message to a specified logger with the ERROR level. More...
#define | LOG4CXX_ASSERT(logger, condition, message)
| Logs a error if the condition is not true. More...
#define | LOG4CXX_FATAL(logger, message)
| Logs a message to a specified logger with the FATAL level. More...
#define | LOG4CXX_L7DLOG(logger, level, key)
| Logs a localized message with no parameter. More...
#define | LOG4CXX_L7DLOG1(logger, level, key, p1)
| Logs a localized message with one parameter. More...
#define | LOG4CXX_L7DLOG2(logger, level, key, p1, p2)
| Logs a localized message with two parameters. More...
#define | LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3)
| Logs a localized message with three parameters. More...

## Detailed Description

## Macro Definition Documentation

## LOG4CXX_ASSERT

#define LOG4CXX_ASSERT | ( |  | logger,
|  |  | condition,
|  |  | message
| ) |  |

Value:
do { \
if (!(condition) && logger->isErrorEnabled()) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::Level::getError
static LevelPtr getError()
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a error if the condition is not true.

Parameters

  logger | the logger to be used.
  condition | condition
  message | the message string to log.

## LOG4CXX_DEBUG

#define LOG4CXX_DEBUG | ( |  | logger,
|  |  | message
| ) |  |

Value:
do { \
if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
log4cxx::Level::getDebug
static LevelPtr getDebug()
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
LOG4CXX_UNLIKELY
#define LOG4CXX_UNLIKELY(expr)
Provides optimization hint to the compiler to optimize for the expression being false.
Definition: logger.h:1744
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a message to a specified logger with the DEBUG level.

Parameters

  logger | the logger to be used.
  message | the message string to log.

## LOG4CXX_ERROR

#define LOG4CXX_ERROR | ( |  | logger,
|  |  | message
| ) |  |

Value:
do { \
if (logger->isErrorEnabled()) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::Level::getError
static LevelPtr getError()
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a message to a specified logger with the ERROR level.

Parameters

  logger | the logger to be used.
  message | the message string to log.

## LOG4CXX_FATAL

#define LOG4CXX_FATAL | ( |  | logger,
|  |  | message
| ) |  |

Value:
do { \
if (logger->isFatalEnabled()) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537
log4cxx::Level::getFatal
static LevelPtr getFatal()

Logs a message to a specified logger with the FATAL level.

Parameters

  logger | the logger to be used.
  message | the message string to log.

## LOG4CXX_INFO

#define LOG4CXX_INFO | ( |  | logger,
|  |  | message
| ) |  |

Value:
do { \
if (logger->isInfoEnabled()) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::Level::getInfo
static LevelPtr getInfo()
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a message to a specified logger with the INFO level.

Parameters

  logger | the logger to be used.
  message | the message string to log.

## LOG4CXX_L7DLOG

#define LOG4CXX_L7DLOG | ( |  | logger,
|  |  | level,
|  |  | key
| ) |  |

Value:
do { \
if (logger->isEnabledFor(level)) {\
logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135

Logs a localized message with no parameter.

Parameters

  logger | the logger to be used.
  level | the level to log.
  key | the key to be searched in the resourceBundle of the logger.

## LOG4CXX_L7DLOG1

#define LOG4CXX_L7DLOG1 | ( |  | logger,
|  |  | level,
|  |  | key,
|  |  | p1
| ) |  |

Value:
do { \
if (logger->isEnabledFor(level)) {\
logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135

Logs a localized message with one parameter.

Parameters

  logger | the logger to be used.
  level | the level to log.
  key | the key to be searched in the resourceBundle of the logger.
  p1 | the unique parameter.

## LOG4CXX_L7DLOG2

#define LOG4CXX_L7DLOG2 | ( |  | logger,
|  |  | level,
|  |  | key,
|  |  | p1,
|  |  | p2
| ) |  |

Value:
do { \
if (logger->isEnabledFor(level)) {\
logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135

Logs a localized message with two parameters.

Parameters

  logger | the logger to be used.
  level | the level to log.
  key | the key to be searched in the resourceBundle of the logger.
  p1 | the first parameter.
  p2 | the second parameter.

## LOG4CXX_L7DLOG3

#define LOG4CXX_L7DLOG3 | ( |  | logger,
|  |  | level,
|  |  | key,
|  |  | p1,
|  |  | p2,
|  |  | p3
| ) |  |

Value:
do { \
if (logger->isEnabledFor(level)) {\
logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135

Logs a localized message with three parameters.

Parameters

  logger | the logger to be used.
  level | the level to log.
  key | the key to be searched in the resourceBundle of the logger.
  p1 | the first parameter.
  p2 | the second parameter.
  p3 | the third parameter.

## LOG4CXX_LOG

#define LOG4CXX_LOG | ( |  | logger,
|  |  | level,
|  |  | message
| ) |  |

Value:
do { \
if (logger->isEnabledFor(level)) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a message to a specified logger with a specified level.

Parameters

  logger | the logger to be used.
  level | the level to log.
  message | the message string to log.

## LOG4CXX_LOGLS

#define LOG4CXX_LOGLS | ( |  | logger,
|  |  | level,
|  |  | message
| ) |  |

Value:
do { \
if (logger->isEnabledFor(level)) {\
::log4cxx::helpers::LogCharMessageBuffer oss_; \
logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135

Logs a message to a specified logger with a specified level.

Parameters

  logger | the logger to be used.
  level | the level to log.
  message | the message string to log in the internal encoding.

## LOG4CXX_TRACE

#define LOG4CXX_TRACE | ( |  | logger,
|  |  | message
| ) |  |

Value:
do { \
if (LOG4CXX_UNLIKELY(logger->isTraceEnabled())) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::Level::getTrace
static LevelPtr getTrace()
LOG4CXX_UNLIKELY
#define LOG4CXX_UNLIKELY(expr)
Provides optimization hint to the compiler to optimize for the expression being false.
Definition: logger.h:1744
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a message to a specified logger with the TRACE level.

Parameters

  logger | the logger to be used.
  message | the message string to log.

## LOG4CXX_UNLIKELY

#define LOG4CXX_UNLIKELY | ( |  | expr | ) | expr

Provides optimization hint to the compiler to optimize for the expression being false.

Parameters

  expr | boolean expression.

Returns
  value of expression.

## LOG4CXX_WARN

#define LOG4CXX_WARN | ( |  | logger,
|  |  | message
| ) |  |

Value:
do { \
if (logger->isWarnEnabled()) {\
::log4cxx::helpers::MessageBuffer oss_; \
logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
LOG4CXX_LOCATION
#define LOG4CXX_LOCATION
Definition: locationinfo.h:135
log4cxx::helpers::MessageBuffer::str
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
log4cxx::Level::getWarn
static LevelPtr getWarn()
log4cxx::helpers::MessageBuffer
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537

Logs a message to a specified logger with the WARN level.

Parameters

  logger | the logger to be used.
  message | the message string to log.