Apache log4cxx (Incubating)  Version 0.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
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

#define LOG4CXX_ASSERT (   logger,
  condition,
  message 
)
Value:
{ \
if (!(condition) && logger->isErrorEnabled()) {\
logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
static LevelPtr getError()
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
loggerthe logger to be used.
conditioncondition
messagethe message string to log.
#define LOG4CXX_DEBUG (   logger,
  message 
)
Value:
{ \
if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
static LevelPtr getDebug()
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
#define LOG4CXX_UNLIKELY(expr)
Provides optimization hint to the compiler to optimize for the expression being false.
Definition: logger.h:1744
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
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_ERROR (   logger,
  message 
)
Value:
{ \
if (logger->isErrorEnabled()) {\
logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
static LevelPtr getError()
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
loggerthe logger to be used.
messagethe message string to log.
#define LOG4CXX_FATAL (   logger,
  message 
)
Value:
{ \
if (logger->isFatalEnabled()) {\
logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
This class is used by the LOG4CXX_INFO and similar macros to support insertion operators in the messa...
Definition: messagebuffer.h:537
static LevelPtr getFatal()

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()) {\
logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
static LevelPtr getInfo()
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
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); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131

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); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131

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); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131

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); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131

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)) {\
logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
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
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); } }
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131

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())) {\
logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
static LevelPtr getTrace()
#define LOG4CXX_UNLIKELY(expr)
Provides optimization hint to the compiler to optimize for the expression being false.
Definition: logger.h:1744
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
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()) {\
logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
#define LOG4CXX_LOCATION
Definition: locationinfo.h:131
const std::string & str(CharMessageBuffer &buf)
Get content of buffer.
static LevelPtr getWarn()
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
loggerthe logger to be used.
messagethe message string to log.