LSST DM logging module built on log4cxx.
More...
#include <functional>
#include <sstream>
#include <stdarg.h>
#include <string>
#include <log4cxx/logger.h>
#include <boost/format.hpp>
Go to the source code of this file.
|
| #define | LOG_CONFIG(filename) |
| |
| #define | LOG_CONFIG_PROP(string) |
| |
| #define | LOG_GET(logger) |
| |
| #define | LOG_GET_CHILD(logger, suffix) |
| |
| #define | LOG_MDC(key, value) |
| |
| #define | LOG_MDC_REMOVE(key) |
| |
| #define | LOG_CONCAT_IMPL(a, b) |
| |
| #define | LOG_CONCAT_IMPL2(a, b) |
| |
| #define | LOG_MDC_SCOPE(key, value) |
| |
| #define | LOG_MDC_INIT(func) |
| |
| #define | LOG_SET_LVL(logger, level) |
| |
| #define | LOG_GET_LVL(logger) |
| |
| #define | LOG_GETEFF_LVL(logger) |
| |
| #define | LOG_CHECK_LVL(logger, level) |
| |
| #define | LOG_CHECK_TRACE() |
| |
| #define | LOG_CHECK_DEBUG() |
| |
| #define | LOG_CHECK_INFO() |
| |
| #define | LOG_CHECK_WARN() |
| |
| #define | LOG_CHECK_ERROR() |
| |
| #define | LOG_CHECK_FATAL() |
| |
| #define | LOG(logger, level, message...) |
| |
| #define | LOG_TRACE(message...) |
| |
| #define | LOG_DEBUG(message...) |
| |
| #define | LOG_INFO(message...) |
| |
| #define | LOG_WARN(message...) |
| |
| #define | LOG_ERROR(message...) |
| |
| #define | LOG_FATAL(message...) |
| |
| #define | LOG_MESSAGE_VIA_STREAM_(logger, level, message) |
| |
| #define | LOGS(logger, level, message) |
| |
| #define | LOGS_TRACE(message) |
| |
| #define | LOGS_DEBUG(message) |
| |
| #define | LOGS_INFO(message) |
| |
| #define | LOGS_WARN(message) |
| |
| #define | LOGS_ERROR(message) |
| |
| #define | LOGS_FATAL(message) |
| |
| #define | LOGL_TRACE(logger, message...) |
| |
| #define | LOGL_DEBUG(logger, message...) |
| |
| #define | LOGL_INFO(logger, message...) |
| |
| #define | LOGL_WARN(logger, message...) |
| |
| #define | LOGL_ERROR(logger, message...) |
| |
| #define | LOGL_FATAL(logger, message...) |
| |
| #define | LOGLS_TRACE(logger, message) |
| |
| #define | LOGLS_DEBUG(logger, message) |
| |
| #define | LOGLS_INFO(logger, message) |
| |
| #define | LOGLS_WARN(logger, message) |
| |
| #define | LOGLS_ERROR(logger, message) |
| |
| #define | LOGLS_FATAL(logger, message) |
| |
|
#define | LOG_LVL_TRACE static_cast<int>(log4cxx::Level::TRACE_INT) |
| |
|
#define | LOG_LVL_DEBUG static_cast<int>(log4cxx::Level::DEBUG_INT) |
| |
|
#define | LOG_LVL_INFO static_cast<int>(log4cxx::Level::INFO_INT) |
| |
|
#define | LOG_LVL_WARN static_cast<int>(log4cxx::Level::WARN_INT) |
| |
|
#define | LOG_LVL_ERROR static_cast<int>(log4cxx::Level::ERROR_INT) |
| |
|
#define | LOG_LVL_FATAL static_cast<int>(log4cxx::Level::FATAL_INT) |
| |
|
#define | LOG_LOGGER lsst::log::Log |
| |
LSST DM logging module built on log4cxx.
- Author
- Bill Chickering Contact: chick.nosp@m.erin.nosp@m.g@cs..nosp@m.stan.nosp@m.ford..nosp@m.edu
◆ LOG
| #define LOG |
( |
| logger, |
|
|
| level, |
|
|
| message... ) |
Value: do { \
if (log.isEnabledFor(level)) { \
log.log(log4cxx::Level::toLevel(level), LOG4CXX_LOCATION, message); } \
} while (false)
Log a message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| level | Logging level associated with message. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOG_CHECK_DEBUG
| #define LOG_CHECK_DEBUG |
( |
| ) |
|
Value:
static Log getDefaultLogger()
Return default logger instance, same as default constructor.
Definition Log.h:766
Return whether the logging threshold of the default logger is less than or equal to DEBUG.
- Returns
- Bool indicating whether or not logger is enabled.
◆ LOG_CHECK_ERROR
| #define LOG_CHECK_ERROR |
( |
| ) |
|
Value:
bool isErrorEnabled() const
Definition Log.h:739
Return whether the logging threshold of the default logger is less than or equal to ERROR.
- Returns
- Bool indicating whether or not logger is enabled.
◆ LOG_CHECK_FATAL
| #define LOG_CHECK_FATAL |
( |
| ) |
|
Value:
bool isFatalEnabled() const
Definition Log.h:743
Return whether the logging threshold of the default logger is less than or equal to FATAL.
- Returns
- Bool indicating whether or not logger is enabled.
◆ LOG_CHECK_INFO
| #define LOG_CHECK_INFO |
( |
| ) |
|
Value:
bool isInfoEnabled() const
Definition Log.h:747
Return whether the logging threshold of the default logger is less than or equal to INFO.
- Returns
- Bool indicating whether or not logger is enabled.
◆ LOG_CHECK_LVL
| #define LOG_CHECK_LVL |
( |
| logger, |
|
|
| level ) |
Value: lsst::log::Log::getLogger(logger).isEnabledFor(level)
Return whether the logging threshold of LOGGER is less than or equal to LEVEL.
- Returns
- Bool indicating whether or not logger is enabled.
- Parameters
-
| logger | Either a logger name or a Log object being queried. |
| level | Logging threshold to check. |
◆ LOG_CHECK_TRACE
| #define LOG_CHECK_TRACE |
( |
| ) |
|
Value:Return whether the logging threshold of the default logger is less than or equal to TRACE.
- Returns
- Bool indicating whether or not logger is enabled.
◆ LOG_CHECK_WARN
| #define LOG_CHECK_WARN |
( |
| ) |
|
Value:
bool isWarnEnabled() const
Definition Log.h:755
Return whether the logging threshold of the default logger is less than or equal to WARN.
- Returns
- Bool indicating whether or not logger is enabled.
◆ LOG_CONCAT_IMPL
| #define LOG_CONCAT_IMPL |
( |
| a, |
|
|
| b ) |
◆ LOG_CONCAT_IMPL2
| #define LOG_CONCAT_IMPL2 |
( |
| a, |
|
|
| b ) |
◆ LOG_CONFIG
| #define LOG_CONFIG |
( |
| filename | ) |
|
Value:
static void configure()
Definition Log.cc:177
Configures log4cxx and initializes logging module.
- Parameters
-
| filename | Path to configuration file. |
◆ LOG_CONFIG_PROP
| #define LOG_CONFIG_PROP |
( |
| string | ) |
|
Value:
static void configure_prop(std::string const &properties)
Definition Log.cc:220
Configures log4cxx from a string containing list of properties. This is equivalent to configuring with a file name containing the same data as a string.
- Note
- Use of this macro will likely produce hard-coded configuration which is not advised for general-use code. It may be useful where pre-defined hard-coded configuration is necessary, e.g. in unit tests.
- Parameters
-
| string | List of properties (lines separated by new line character) |
◆ LOG_DEBUG
| #define LOG_DEBUG |
( |
| message... | ) |
|
Value: do { \
if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
log.log(log4cxx::Level::getDebug(), LOG4CXX_LOCATION, message); } \
} while (false)
Log a debug-level message to the default logger using a varargs/printf style interface.
- Parameters
-
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOG_ERROR
| #define LOG_ERROR |
( |
| message... | ) |
|
Value: do { \
if (log.isErrorEnabled()) { \
log.log(log4cxx::Level::getError(), LOG4CXX_LOCATION, message); } \
} while (false)
Log a error-level message to the default logger using a varargs/printf style interface.
- Parameters
-
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOG_FATAL
| #define LOG_FATAL |
( |
| message... | ) |
|
Value: do { \
if (log.isFatalEnabled()) { \
log.log(log4cxx::Level::getFatal(), LOG4CXX_LOCATION, message); } \
} while (false)
Log a fatal-level message to the default logger using a varargs/printf style interface.
- Parameters
-
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOG_GET
| #define LOG_GET |
( |
| logger | ) |
|
Value:lsst::log::Log::getLogger(logger)
Returns a Log object associated with logger.
- Returns
- Log object corresponding to logger.
- Parameters
-
| logger | Either a logger name or a Log object. |
◆ LOG_GET_CHILD
| #define LOG_GET_CHILD |
( |
| logger, |
|
|
| suffix ) |
Value:lsst::log::Log::getLogger(logger).getChild(suffix)
Returns a Log object associated with descendant of a logger.
- Returns
- Log object corresponding to logger's descendant.
- Parameters
-
| logger | Either a logger name or a Log object. |
| suffix | Suffix of a descendant. |
◆ LOG_GET_LVL
| #define LOG_GET_LVL |
( |
| logger | ) |
|
Value: lsst::log::Log::getLogger(logger).getLevel()
Retrieve the logging threshold for LOGGER.
- Returns
- int Indicating the logging threshold.
- Parameters
-
| logger | Either a logger name or a Log object with threshold to return. |
◆ LOG_GETEFF_LVL
| #define LOG_GETEFF_LVL |
( |
| logger | ) |
|
Value: lsst::log::Log::getLogger(logger).getEffectiveLevel()
Retrieve the effective logging threshold for LOGGER.
- Returns
- int Indicating the effective logging threshold.
- Parameters
-
| logger | Either a logger name or a Log object with threshold to return. |
◆ LOG_INFO
| #define LOG_INFO |
( |
| message... | ) |
|
Value: do { \
if (log.isInfoEnabled()) { \
log.log(log4cxx::Level::getInfo(), LOG4CXX_LOCATION, message); } \
} while (false)
Log a info-level message to the default logger using a varargs/printf style interface.
- Parameters
-
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOG_MDC
| #define LOG_MDC |
( |
| key, |
|
|
| value ) |
Value:
static std::string MDC(std::string const &key, std::string const &value)
Definition Log.cc:274
Places a KEY/VALUE pair in the Mapped Diagnostic Context (MDC) for the current thread. The VALUE may then be included in log messages by using the following the X conversion character within a pattern layout as X{KEY}.
- Parameters
-
| key | Unique key. |
| value | String value. |
◆ LOG_MDC_INIT
| #define LOG_MDC_INIT |
( |
| func | ) |
|
Value:lsst::log::Log::MDCRegisterInit(std::function<void()>(func))
Register function for initialization of MDC. This function will be called for current thread and every new thread (but not for other existing threads) before any message is logged using one of the macros below. Its main purpose is to initialize MDC (using LOG_MDC macro). In some cases the function may be called more than once per thread.
This macro is thread safe, but typically it will be called from main thread before any other LOG macro.
Macro returns an integer number, the value is not specified, but this allows it to be used in one-time initialization constructs like:
@code
static int dummyMdcInit = LOG_MDC_INIT(some_init_func);
@endcode
- Parameters
-
| func | Any function object which takes no arguments and returns void. |
◆ LOG_MDC_REMOVE
| #define LOG_MDC_REMOVE |
( |
| key | ) |
|
Value:
static void MDCRemove(std::string const &key)
Definition Log.cc:288
Remove the value associated with KEY within the MDC.
- Parameters
-
| key | Key identifying value to remove. |
◆ LOG_MDC_SCOPE
| #define LOG_MDC_SCOPE |
( |
| key, |
|
|
| value ) |
Value:Places a KEY/VALUE pair in the Mapped Diagnostic Context (MDC) for the current thread, and restores previous KEY/VALUE on exit from a scope.
- Parameters
-
| key | Unique key. |
| value | String value. |
◆ LOG_MESSAGE_VIA_STREAM_
| #define LOG_MESSAGE_VIA_STREAM_ |
( |
| logger, |
|
|
| level, |
|
|
| message ) |
Value: std::ostringstream stream_; \
stream_ << message; \
logger.logMsg(level, LOG4CXX_LOCATION, stream_.str())
◆ LOG_SET_LVL
| #define LOG_SET_LVL |
( |
| logger, |
|
|
| level ) |
Value: lsst::log::Log::getLogger(logger).setLevel(level)
Set the logging threshold for LOGGER to LEVEL.
- Parameters
-
| logger | Logger with threshold to adjust. |
| level | New logging threshold. |
◆ LOG_TRACE
| #define LOG_TRACE |
( |
| message... | ) |
|
Value: do { \
if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
log.log(log4cxx::Level::getTrace(), LOG4CXX_LOCATION, message); } \
} while (false)
Log a trace-level message to the default logger using a varargs/printf style interface.
- Parameters
-
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOG_WARN
| #define LOG_WARN |
( |
| message... | ) |
|
Value: do { \
if (log.isWarnEnabled()) { \
log.log(log4cxx::Level::getWarn(), LOG4CXX_LOCATION, message); } \
} while (false)
Log a warn-level message to the default logger using a varargs/printf style interface.
- Parameters
-
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGL_DEBUG
| #define LOGL_DEBUG |
( |
| logger, |
|
|
| message... ) |
Value: do { \
if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
log.log(log4cxx::Level::getDebug(), LOG4CXX_LOCATION, message); \
} \
} while (false)
Log a debug-level message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGL_ERROR
| #define LOGL_ERROR |
( |
| logger, |
|
|
| message... ) |
Value: do { \
if (log.isErrorEnabled()) { \
log.log(log4cxx::Level::getError(), LOG4CXX_LOCATION, message); \
} \
} while (false)
Log a error-level message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGL_FATAL
| #define LOGL_FATAL |
( |
| logger, |
|
|
| message... ) |
Value: do { \
if (log.isFatalEnabled()) { \
log.log(log4cxx::Level::getFatal(), LOG4CXX_LOCATION, message); \
} \
} while (false)
Log a fatal-level message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGL_INFO
| #define LOGL_INFO |
( |
| logger, |
|
|
| message... ) |
Value: do { \
if (log.isInfoEnabled()) { \
log.log(log4cxx::Level::getInfo(), LOG4CXX_LOCATION, message); \
} \
} while (false)
Log a info-level message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGL_TRACE
| #define LOGL_TRACE |
( |
| logger, |
|
|
| message... ) |
Value: do { \
if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
log.log(log4cxx::Level::getTrace(), LOG4CXX_LOCATION, message);\
} \
} while (false)
Log a trace-level message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGL_WARN
| #define LOGL_WARN |
( |
| logger, |
|
|
| message... ) |
Value: do { \
if (log.isWarnEnabled()) { \
log.log(log4cxx::Level::getWarn(), LOG4CXX_LOCATION, message); \
} \
} while (false)
Log a warn-level message using a varargs/printf style interface.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | An sprintf-compatible format string followed by zero, one, or more comma-separated arguments. |
◆ LOGLS_DEBUG
| #define LOGLS_DEBUG |
( |
| logger, |
|
|
| message ) |
Value: do { \
if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getDebug(), message); \
} \
} while (false)
Log a debug-level message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGLS_DEBUG(logger, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | Message to be logged. |
◆ LOGLS_ERROR
| #define LOGLS_ERROR |
( |
| logger, |
|
|
| message ) |
Value: do { \
if (log.isErrorEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getError(), message); \
} \
} while (false)
Log a error-level message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGLS_ERROR(logger, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | Message to be logged. |
◆ LOGLS_FATAL
| #define LOGLS_FATAL |
( |
| logger, |
|
|
| message ) |
Value: do { \
if (log.isFatalEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getFatal(), message); \
} \
} while (false)
Log a fatal-level message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGLS_FATAL(logger, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | Message to be logged. |
◆ LOGLS_INFO
| #define LOGLS_INFO |
( |
| logger, |
|
|
| message ) |
Value: do { \
if (log.isInfoEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getInfo(), message); \
} \
} while (false)
Log a info-level message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGLS_INFO(logger, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | Message to be logged. |
◆ LOGLS_TRACE
| #define LOGLS_TRACE |
( |
| logger, |
|
|
| message ) |
Value: do { \
if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getTrace(), message); \
} \
} while (false)
Log a trace-level message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGLS_TRACE(logger, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | Message to be logged. |
◆ LOGLS_WARN
| #define LOGLS_WARN |
( |
| logger, |
|
|
| message ) |
Value: do { \
if (log.isWarnEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getWarn(), message); \
} \
} while (false)
Log a warn-level message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGLS_WARN(logger, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| message | Message to be logged. |
◆ LOGS
| #define LOGS |
( |
| logger, |
|
|
| level, |
|
|
| message ) |
Value: do { \
if (log.isEnabledFor(level)) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::toLevel(level), message); \
} \
} while (false)
Log a message using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS("logger", LOG_LVL_DEBUG, "coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| logger | Either a logger name or a Log object. |
| level | Logging level associated with message. |
| message | Message to be logged. |
◆ LOGS_DEBUG
| #define LOGS_DEBUG |
( |
| message | ) |
|
Value: do { \
if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getDebug(), message); \
} \
} while (false)
Log a debug-level message to the default logger using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS_DEBUG("coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| message | Message to be logged. |
◆ LOGS_ERROR
| #define LOGS_ERROR |
( |
| message | ) |
|
Value: do { \
if (log.isErrorEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getError(), message); \
} \
} while (false)
Log a error-level message to the default logger using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS_ERROR("coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| message | Message to be logged. |
◆ LOGS_FATAL
| #define LOGS_FATAL |
( |
| message | ) |
|
Value: do { \
if (log.isFatalEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getFatal(), message); \
} \
} while (false)
Log a fatal-level message to the default logger using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS_FATAL("coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| message | Message to be logged. |
◆ LOGS_INFO
| #define LOGS_INFO |
( |
| message | ) |
|
Value: do { \
if (log.isInfoEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getInfo(), message); \
} \
} while (false)
Log a info-level message to the default logger using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS_INFO("coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| message | Message to be logged. |
◆ LOGS_TRACE
| #define LOGS_TRACE |
( |
| message | ) |
|
Value: do { \
if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getTrace(), message); \
} \
} while (false)
Log a trace-level message to the default logger using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS_TRACE("coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| message | Message to be logged. |
◆ LOGS_WARN
| #define LOGS_WARN |
( |
| message | ) |
|
Value: do { \
if (log.isWarnEnabled()) { \
LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getWarn(), message); \
} \
} while (false)
Log a warning-level message to the default logger using an iostream-based interface.
Message is any expression which can appear on the right side of the stream insertion operator, e.g. LOGS_WARN("coordinates: x=" << x << " y=" << y);. Usual caveat regarding commas inside macro arguments applies to message argument.
- Parameters
-
| message | Message to be logged. |
◆ lwpID()
| unsigned lsst::log::lwpID |
( |
| ) |
|
Function which returns LWP ID on platforms which support it.
On all other platforms a small incremental integer number (counting number of threads) is returned. This function can be used to produce more human-friendly thread ID for logging instead of regular t format.