Apache log4cxx  Version 0.10.0
Logging macros

Defines

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

Define Documentation

#define LOG4CXX_ASSERT (   logger,
  condition,
  message 
)
Value:
{ \
        if (!(condition) && logger->isErrorEnabled()) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

Logs a error if the condition is not true.

Parameters:
loggerthe logger to be used.
conditioncondition
messagethe message string to log.
#define LOG4CXX_DEBUG (   logger,
  message 
)
Value:
{ \
        if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

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

Parameters:
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_ERROR (   logger,
  message 
)
Value:
{ \
        if (logger->isErrorEnabled()) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

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

Parameters:
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_FATAL (   logger,
  message 
)
Value:
{ \
        if (logger->isFatalEnabled()) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

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

Parameters:
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_INFO (   logger,
  message 
)
Value:
{ \
        if (logger->isInfoEnabled()) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

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

Parameters:
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_L7DLOG (   logger,
  level,
  key 
)
Value:
{ \
        if (logger->isEnabledFor(level)) {\
        logger->l7dlog(level, key, LOG4CXX_LOCATION); }}

Logs a localized message with no parameter.

Parameters:
loggerthe logger to be used.
levelthe level to log.
keythe key to be searched in the resourceBundle of the logger.
#define LOG4CXX_L7DLOG1 (   logger,
  level,
  key,
  p1 
)
Value:
{ \
        if (logger->isEnabledFor(level)) {\
        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }}

Logs a localized message with one parameter.

Parameters:
loggerthe logger to be used.
levelthe level to log.
keythe key to be searched in the resourceBundle of the logger.
p1the unique parameter.
#define LOG4CXX_L7DLOG2 (   logger,
  level,
  key,
  p1,
  p2 
)
Value:
{ \
        if (logger->isEnabledFor(level)) {\
        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }}

Logs a localized message with two parameters.

Parameters:
loggerthe logger to be used.
levelthe level to log.
keythe key to be searched in the resourceBundle of the logger.
p1the first parameter.
p2the second parameter.
#define LOG4CXX_L7DLOG3 (   logger,
  level,
  key,
  p1,
  p2,
  p3 
)
Value:
{ \
        if (logger->isEnabledFor(level)) {\
        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }}

Logs a localized message with three parameters.

Parameters:
loggerthe logger to be used.
levelthe level to log.
keythe key to be searched in the resourceBundle of the logger.
p1the first parameter.
p2the second parameter.
p3the third parameter.
#define LOG4CXX_LOG (   logger,
  level,
  message 
)
Value:
{ \
        if (logger->isEnabledFor(level)) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }

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

Parameters:
loggerthe logger to be used.
levelthe level to log.
messagethe message string to log.
#define LOG4CXX_LOGLS (   logger,
  level,
  message 
)
Value:
{ \
        if (logger->isEnabledFor(level)) {\
           ::log4cxx::helpers::LogCharMessageBuffer oss_; \
           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }

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

Parameters:
loggerthe logger to be used.
levelthe level to log.
messagethe message string to log in the internal encoding.
#define LOG4CXX_TRACE (   logger,
  message 
)
Value:
{ \
        if (LOG4CXX_UNLIKELY(logger->isTraceEnabled())) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

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

Parameters:
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_UNLIKELY (   expr)    expr

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

Parameters:
exprboolean expression.
Returns:
value of expression.
#define LOG4CXX_WARN (   logger,
  message 
)
Value:
{ \
        if (logger->isWarnEnabled()) {\
           ::log4cxx::helpers::MessageBuffer oss_; \
           logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}

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

Parameters:
loggerthe logger to be used.
messagethe message string to log.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines