LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
Log.h File Reference

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.

Classes

class  lsst::log::Log
 This static class includes a variety of methods for interacting with the the logging module. More...
 
class  lsst::log::LogMDCScope
 

Namespaces

namespace  lsst
 
namespace  lsst::log
 

Macros

#define LOG_CONFIG(filename)   lsst::log::Log::configure(filename)
 Configures log4cxx and initializes logging module.
 
#define LOG_CONFIG_PROP(string)   lsst::log::Log::configure_prop(string)
 Configures log4cxx from a string containing list of properties.
 
#define LOG_GET(logger)   lsst::log::Log::getLogger(logger)
 Returns a Log object associated with logger.
 
#define LOG_GET_CHILD(logger, suffix)   lsst::log::Log::getLogger(logger).getChild(suffix)
 Returns a Log object associated with descendant of a logger.
 
#define LOG_MDC(key, value)   lsst::log::Log::MDC(key, value)
 Places a KEY/VALUE pair in the Mapped Diagnostic Context (MDC) for the current thread.
 
#define LOG_MDC_REMOVE(key)   lsst::log::Log::MDCRemove(key)
 Remove the value associated with KEY within the MDC.
 
#define LOG_CONCAT_IMPL(a, b)   a ## b
 
#define LOG_CONCAT_IMPL2(a, b)   LOG_CONCAT_IMPL(a, b)
 
#define LOG_MDC_SCOPE(key, value)   lsst::log::LogMDCScope LOG_CONCAT_IMPL2(_log_mdc_scope_, __COUNTER__)(key, 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.
 
#define LOG_MDC_INIT(func)   lsst::log::Log::MDCRegisterInit(std::function<void()>(func))
 Register function for initialization of MDC.
 
#define LOG_SET_LVL(logger, level)    lsst::log::Log::getLogger(logger).setLevel(level)
 Set the logging threshold for LOGGER to LEVEL.
 
#define LOG_GET_LVL(logger)    lsst::log::Log::getLogger(logger).getLevel()
 Retrieve the logging threshold for LOGGER.
 
#define LOG_GETEFF_LVL(logger)    lsst::log::Log::getLogger(logger).getEffectiveLevel()
 Retrieve the effective logging threshold for LOGGER.
 
#define LOG_CHECK_LVL(logger, level)    lsst::log::Log::getLogger(logger).isEnabledFor(level)
 Return whether the logging threshold of LOGGER is less than or equal to LEVEL.
 
#define LOG_CHECK_TRACE()    LOG4CXX_UNLIKELY(lsst::log::Log::getDefaultLogger().isTraceEnabled())
 Return whether the logging threshold of the default logger is less than or equal to TRACE.
 
#define LOG_CHECK_DEBUG()    LOG4CXX_UNLIKELY(lsst::log::Log::getDefaultLogger().isDebugEnabled())
 Return whether the logging threshold of the default logger is less than or equal to DEBUG.
 
#define LOG_CHECK_INFO()    lsst::log::Log::getDefaultLogger().isInfoEnabled()
 Return whether the logging threshold of the default logger is less than or equal to INFO.
 
#define LOG_CHECK_WARN()    lsst::log::Log::getDefaultLogger().isWarnEnabled()
 Return whether the logging threshold of the default logger is less than or equal to WARN.
 
#define LOG_CHECK_ERROR()    lsst::log::Log::getDefaultLogger().isErrorEnabled()
 Return whether the logging threshold of the default logger is less than or equal to ERROR.
 
#define LOG_CHECK_FATAL()    lsst::log::Log::getDefaultLogger().isFatalEnabled()
 Return whether the logging threshold of the default logger is less than or equal to FATAL.
 
#define LOG(logger, level, message...)
 Log a message using a varargs/printf style interface.
 
#define LOG_TRACE(message...)
 Log a trace-level message to the default logger using a varargs/printf style interface.
 
#define LOG_DEBUG(message...)
 Log a debug-level message to the default logger using a varargs/printf style interface.
 
#define LOG_INFO(message...)
 Log a info-level message to the default logger using a varargs/printf style interface.
 
#define LOG_WARN(message...)
 Log a warn-level message to the default logger using a varargs/printf style interface.
 
#define LOG_ERROR(message...)
 Log a error-level message to the default logger using a varargs/printf style interface.
 
#define LOG_FATAL(message...)
 Log a fatal-level message to the default logger using a varargs/printf style interface.
 
#define LOG_MESSAGE_VIA_STREAM_(logger, level, message)
 
#define LOGS(logger, level, message)
 Log a message using an iostream-based interface.
 
#define LOGS_TRACE(message)
 Log a trace-level message to the default logger using an iostream-based interface.
 
#define LOGS_DEBUG(message)
 Log a debug-level message to the default logger using an iostream-based interface.
 
#define LOGS_INFO(message)
 Log a info-level message to the default logger using an iostream-based interface.
 
#define LOGS_WARN(message)
 Log a warning-level message to the default logger using an iostream-based interface.
 
#define LOGS_ERROR(message)
 Log a error-level message to the default logger using an iostream-based interface.
 
#define LOGS_FATAL(message)
 Log a fatal-level message to the default logger using an iostream-based interface.
 
#define LOGL_TRACE(logger, message...)
 Log a trace-level message using a varargs/printf style interface.
 
#define LOGL_DEBUG(logger, message...)
 Log a debug-level message using a varargs/printf style interface.
 
#define LOGL_INFO(logger, message...)
 Log a info-level message using a varargs/printf style interface.
 
#define LOGL_WARN(logger, message...)
 Log a warn-level message using a varargs/printf style interface.
 
#define LOGL_ERROR(logger, message...)
 Log a error-level message using a varargs/printf style interface.
 
#define LOGL_FATAL(logger, message...)
 Log a fatal-level message using a varargs/printf style interface.
 
#define LOGLS_TRACE(logger, message)
 Log a trace-level message using an iostream-based interface.
 
#define LOGLS_DEBUG(logger, message)
 Log a debug-level message using an iostream-based interface.
 
#define LOGLS_INFO(logger, message)
 Log a info-level message using an iostream-based interface.
 
#define LOGLS_WARN(logger, message)
 Log a warn-level message using an iostream-based interface.
 
#define LOGLS_ERROR(logger, message)
 Log a error-level message using an iostream-based interface.
 
#define LOGLS_FATAL(logger, message)
 Log a fatal-level message using an iostream-based interface.
 
#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
 

Functions

unsigned lsst::log::lwpID ()
 Function which returns LWP ID on platforms which support it.
 

Detailed Description

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

Definition in file Log.h.

Macro Definition Documentation

◆ LOG

#define LOG ( logger,
level,
message... )
Value:
do { \
if (log.isEnabledFor(level)) { \
log.log(log4cxx::Level::toLevel(level), LOG4CXX_LOCATION, message); } \
} while (false)
This static class includes a variety of methods for interacting with the the logging module.
Definition Log.h:724
static Log getLogger(Log const &logger)
Definition Log.h:772

Log a message using a varargs/printf style interface.

Parameters
loggerEither a logger name or a Log object.
levelLogging level associated with message.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 251 of file Log.h.

251#define LOG(logger, level, message...) \
252 do { \
253 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
254 if (log.isEnabledFor(level)) { \
255 log.log(log4cxx::Level::toLevel(level), LOG4CXX_LOCATION, message); } \
256 } while (false)

◆ LOG_CHECK_DEBUG

#define LOG_CHECK_DEBUG ( )     LOG4CXX_UNLIKELY(lsst::log::Log::getDefaultLogger().isDebugEnabled())

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.

Definition at line 203 of file Log.h.

203#define LOG_CHECK_DEBUG() \
204 LOG4CXX_UNLIKELY(lsst::log::Log::getDefaultLogger().isDebugEnabled())

◆ LOG_CHECK_ERROR

#define LOG_CHECK_ERROR ( )     lsst::log::Log::getDefaultLogger().isErrorEnabled()

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.

Definition at line 230 of file Log.h.

230#define LOG_CHECK_ERROR() \
231 lsst::log::Log::getDefaultLogger().isErrorEnabled()

◆ LOG_CHECK_FATAL

#define LOG_CHECK_FATAL ( )     lsst::log::Log::getDefaultLogger().isFatalEnabled()

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.

Definition at line 239 of file Log.h.

239#define LOG_CHECK_FATAL() \
240 lsst::log::Log::getDefaultLogger().isFatalEnabled()

◆ LOG_CHECK_INFO

#define LOG_CHECK_INFO ( )     lsst::log::Log::getDefaultLogger().isInfoEnabled()

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.

Definition at line 212 of file Log.h.

212#define LOG_CHECK_INFO() \
213 lsst::log::Log::getDefaultLogger().isInfoEnabled()

◆ LOG_CHECK_LVL

#define LOG_CHECK_LVL ( logger,
level )    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
loggerEither a logger name or a Log object being queried.
levelLogging threshold to check.

Definition at line 185 of file Log.h.

185#define LOG_CHECK_LVL(logger, level) \
186 lsst::log::Log::getLogger(logger).isEnabledFor(level)

◆ LOG_CHECK_TRACE

#define LOG_CHECK_TRACE ( )     LOG4CXX_UNLIKELY(lsst::log::Log::getDefaultLogger().isTraceEnabled())

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.

Definition at line 194 of file Log.h.

194#define LOG_CHECK_TRACE() \
195 LOG4CXX_UNLIKELY(lsst::log::Log::getDefaultLogger().isTraceEnabled())

◆ LOG_CHECK_WARN

#define LOG_CHECK_WARN ( )     lsst::log::Log::getDefaultLogger().isWarnEnabled()

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.

Definition at line 221 of file Log.h.

221#define LOG_CHECK_WARN() \
222 lsst::log::Log::getDefaultLogger().isWarnEnabled()

◆ LOG_CONCAT_IMPL

#define LOG_CONCAT_IMPL ( a,
b )   a ## b

Definition at line 118 of file Log.h.

◆ LOG_CONCAT_IMPL2

#define LOG_CONCAT_IMPL2 ( a,
b )   LOG_CONCAT_IMPL(a, b)

Definition at line 119 of file Log.h.

◆ LOG_CONFIG

#define LOG_CONFIG ( filename)    lsst::log::Log::configure(filename)

Configures log4cxx and initializes logging module.

Parameters
filenamePath to configuration file.

Definition at line 52 of file Log.h.

◆ LOG_CONFIG_PROP

#define LOG_CONFIG_PROP ( string)    lsst::log::Log::configure_prop(string)

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
stringList of properties (lines separated by new line character)

Definition at line 66 of file Log.h.

◆ LOG_DEBUG

#define LOG_DEBUG ( message...)
Value:
do { \
if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
log.log(log4cxx::Level::getDebug(), LOG4CXX_LOCATION, message); } \
} while (false)
void log(log4cxx::LevelPtr level, log4cxx::spi::LocationInfo const &location, char const *fmt,...)
Method used by LOG_INFO and similar macros to process a log message with variable arguments along wit...
Definition Log.cc:386

Log a debug-level message to the default logger using a varargs/printf style interface.

Parameters
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 281 of file Log.h.

281#define LOG_DEBUG(message...) \
282 do { \
283 lsst::log::Log log; \
284 if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
285 log.log(log4cxx::Level::getDebug(), LOG4CXX_LOCATION, message); } \
286 } while (false)

◆ 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
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 326 of file Log.h.

326#define LOG_ERROR(message...) \
327 do { \
328 lsst::log::Log log; \
329 if (log.isErrorEnabled()) { \
330 log.log(log4cxx::Level::getError(), LOG4CXX_LOCATION, message); } \
331 } while (false)

◆ 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
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 341 of file Log.h.

341#define LOG_FATAL(message...) \
342 do { \
343 lsst::log::Log log; \
344 if (log.isFatalEnabled()) { \
345 log.log(log4cxx::Level::getFatal(), LOG4CXX_LOCATION, message); } \
346 } while (false)

◆ LOG_GET

#define LOG_GET ( logger)    lsst::log::Log::getLogger(logger)

Returns a Log object associated with logger.

Returns
Log object corresponding to logger.
Parameters
loggerEither a logger name or a Log object.

Definition at line 75 of file Log.h.

◆ LOG_GET_CHILD

#define LOG_GET_CHILD ( logger,
suffix )   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
loggerEither a logger name or a Log object.
suffixSuffix of a descendant.

Definition at line 85 of file Log.h.

◆ LOG_GET_LVL

#define LOG_GET_LVL ( logger)     lsst::log::Log::getLogger(logger).getLevel()

Retrieve the logging threshold for LOGGER.

Returns
int Indicating the logging threshold.
Parameters
loggerEither a logger name or a Log object with threshold to return.

Definition at line 162 of file Log.h.

162#define LOG_GET_LVL(logger) \
163 lsst::log::Log::getLogger(logger).getLevel()

◆ LOG_GETEFF_LVL

#define LOG_GETEFF_LVL ( logger)     lsst::log::Log::getLogger(logger).getEffectiveLevel()

Retrieve the effective logging threshold for LOGGER.

Returns
int Indicating the effective logging threshold.
Parameters
loggerEither a logger name or a Log object with threshold to return.

Definition at line 173 of file Log.h.

173#define LOG_GETEFF_LVL(logger) \
174 lsst::log::Log::getLogger(logger).getEffectiveLevel()

◆ 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
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 296 of file Log.h.

296#define LOG_INFO(message...) \
297 do { \
298 lsst::log::Log log; \
299 if (log.isInfoEnabled()) { \
300 log.log(log4cxx::Level::getInfo(), LOG4CXX_LOCATION, message); } \
301 } while (false)

◆ LOG_LOGGER

#define LOG_LOGGER   lsst::log::Log

Definition at line 714 of file Log.h.

◆ LOG_LVL_DEBUG

#define LOG_LVL_DEBUG   static_cast<int>(log4cxx::Level::DEBUG_INT)

Definition at line 708 of file Log.h.

◆ LOG_LVL_ERROR

#define LOG_LVL_ERROR   static_cast<int>(log4cxx::Level::ERROR_INT)

Definition at line 711 of file Log.h.

◆ LOG_LVL_FATAL

#define LOG_LVL_FATAL   static_cast<int>(log4cxx::Level::FATAL_INT)

Definition at line 712 of file Log.h.

◆ LOG_LVL_INFO

#define LOG_LVL_INFO   static_cast<int>(log4cxx::Level::INFO_INT)

Definition at line 709 of file Log.h.

◆ LOG_LVL_TRACE

#define LOG_LVL_TRACE   static_cast<int>(log4cxx::Level::TRACE_INT)

Definition at line 707 of file Log.h.

◆ LOG_LVL_WARN

#define LOG_LVL_WARN   static_cast<int>(log4cxx::Level::WARN_INT)

Definition at line 710 of file Log.h.

◆ LOG_MDC

#define LOG_MDC ( key,
value )   lsst::log::Log::MDC(key, value)

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
keyUnique key.
valueString value.

Definition at line 97 of file Log.h.

◆ LOG_MDC_INIT

#define LOG_MDC_INIT ( func)    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
funcAny function object which takes no arguments and returns void.

Definition at line 142 of file Log.h.

◆ LOG_MDC_REMOVE

#define LOG_MDC_REMOVE ( key)    lsst::log::Log::MDCRemove(key)

Remove the value associated with KEY within the MDC.

Parameters
keyKey identifying value to remove.

Definition at line 105 of file Log.h.

◆ LOG_MDC_SCOPE

#define LOG_MDC_SCOPE ( key,
value )   lsst::log::LogMDCScope LOG_CONCAT_IMPL2(_log_mdc_scope_, __COUNTER__)(key, 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
keyUnique key.
valueString value.

Definition at line 120 of file Log.h.

◆ 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())
T str(T... args)

Definition at line 350 of file Log.h.

350#define LOG_MESSAGE_VIA_STREAM_(logger, level, message) \
351 std::ostringstream stream_; \
352 stream_ << message; \
353 logger.logMsg(level, LOG4CXX_LOCATION, stream_.str())

◆ LOG_SET_LVL

#define LOG_SET_LVL ( logger,
level )    lsst::log::Log::getLogger(logger).setLevel(level)

Set the logging threshold for LOGGER to LEVEL.

Parameters
loggerLogger with threshold to adjust.
levelNew logging threshold.

Definition at line 151 of file Log.h.

151#define LOG_SET_LVL(logger, level) \
152 lsst::log::Log::getLogger(logger).setLevel(level)

◆ 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
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 266 of file Log.h.

266#define LOG_TRACE(message...) \
267 do { \
268 lsst::log::Log log; \
269 if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
270 log.log(log4cxx::Level::getTrace(), LOG4CXX_LOCATION, message); } \
271 } while (false)

◆ 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
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 311 of file Log.h.

311#define LOG_WARN(message...) \
312 do { \
313 lsst::log::Log log; \
314 if (log.isWarnEnabled()) { \
315 log.log(log4cxx::Level::getWarn(), LOG4CXX_LOCATION, message); } \
316 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 515 of file Log.h.

515#define LOGL_DEBUG(logger, message...) \
516 do { \
517 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
518 if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
519 log.log(log4cxx::Level::getDebug(), LOG4CXX_LOCATION, message); \
520 } \
521 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 563 of file Log.h.

563#define LOGL_ERROR(logger, message...) \
564 do { \
565 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
566 if (log.isErrorEnabled()) { \
567 log.log(log4cxx::Level::getError(), LOG4CXX_LOCATION, message); \
568 } \
569 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 579 of file Log.h.

579#define LOGL_FATAL(logger, message...) \
580 do { \
581 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
582 if (log.isFatalEnabled()) { \
583 log.log(log4cxx::Level::getFatal(), LOG4CXX_LOCATION, message); \
584 } \
585 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 531 of file Log.h.

531#define LOGL_INFO(logger, message...) \
532 do { \
533 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
534 if (log.isInfoEnabled()) { \
535 log.log(log4cxx::Level::getInfo(), LOG4CXX_LOCATION, message); \
536 } \
537 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 499 of file Log.h.

499#define LOGL_TRACE(logger, message...) \
500 do { \
501 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
502 if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
503 log.log(log4cxx::Level::getTrace(), LOG4CXX_LOCATION, message);\
504 } \
505 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageAn sprintf-compatible format string followed by zero, one, or more comma-separated arguments.

Definition at line 547 of file Log.h.

547#define LOGL_WARN(logger, message...) \
548 do { \
549 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
550 if (log.isWarnEnabled()) { \
551 log.log(log4cxx::Level::getWarn(), LOG4CXX_LOCATION, message); \
552 } \
553 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageMessage to be logged.

Definition at line 619 of file Log.h.

619#define LOGLS_DEBUG(logger, message) \
620 do { \
621 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
622 if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
623 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getDebug(), message); \
624 } \
625 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageMessage to be logged.

Definition at line 679 of file Log.h.

679#define LOGLS_ERROR(logger, message) \
680 do { \
681 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
682 if (log.isErrorEnabled()) { \
683 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getError(), message); \
684 } \
685 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageMessage to be logged.

Definition at line 699 of file Log.h.

699#define LOGLS_FATAL(logger, message) \
700 do { \
701 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
702 if (log.isFatalEnabled()) { \
703 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getFatal(), message); \
704 } \
705 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageMessage to be logged.

Definition at line 639 of file Log.h.

639#define LOGLS_INFO(logger, message) \
640 do { \
641 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
642 if (log.isInfoEnabled()) { \
643 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getInfo(), message); \
644 } \
645 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageMessage to be logged.

Definition at line 599 of file Log.h.

599#define LOGLS_TRACE(logger, message) \
600 do { \
601 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
602 if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
603 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getTrace(), message); \
604 } \
605 } while (false)

◆ 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
loggerEither a logger name or a Log object.
messageMessage to be logged.

Definition at line 659 of file Log.h.

659#define LOGLS_WARN(logger, message) \
660 do { \
661 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
662 if (log.isWarnEnabled()) { \
663 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getWarn(), message); \
664 } \
665 } while (false)

◆ 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
loggerEither a logger name or a Log object.
levelLogging level associated with message.
messageMessage to be logged.

Definition at line 369 of file Log.h.

369#define LOGS(logger, level, message) \
370 do { \
371 lsst::log::Log log(lsst::log::Log::getLogger(logger)); \
372 if (log.isEnabledFor(level)) { \
373 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::toLevel(level), message); \
374 } \
375 } while (false)

◆ 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
messageMessage to be logged.

Definition at line 407 of file Log.h.

407#define LOGS_DEBUG(message) \
408 do { \
409 lsst::log::Log log; \
410 if (LOG4CXX_UNLIKELY(log.isDebugEnabled())) { \
411 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getDebug(), message); \
412 } \
413 } while (false)

◆ 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
messageMessage to be logged.

Definition at line 464 of file Log.h.

464#define LOGS_ERROR(message) \
465 do { \
466 lsst::log::Log log; \
467 if (log.isErrorEnabled()) { \
468 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getError(), message); \
469 } \
470 } while (false)

◆ 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
messageMessage to be logged.

Definition at line 483 of file Log.h.

483#define LOGS_FATAL(message) \
484 do { \
485 lsst::log::Log log; \
486 if (log.isFatalEnabled()) { \
487 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getFatal(), message); \
488 } \
489 } while (false)

◆ 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
messageMessage to be logged.

Definition at line 426 of file Log.h.

426#define LOGS_INFO(message) \
427 do { \
428 lsst::log::Log log; \
429 if (log.isInfoEnabled()) { \
430 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getInfo(), message); \
431 } \
432 } while (false)

◆ 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
messageMessage to be logged.

Definition at line 388 of file Log.h.

388#define LOGS_TRACE(message) \
389 do { \
390 lsst::log::Log log; \
391 if (LOG4CXX_UNLIKELY(log.isTraceEnabled())) { \
392 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getTrace(), message); \
393 } \
394 } while (false)

◆ 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
messageMessage to be logged.

Definition at line 445 of file Log.h.

445#define LOGS_WARN(message) \
446 do { \
447 lsst::log::Log log; \
448 if (log.isWarnEnabled()) { \
449 LOG_MESSAGE_VIA_STREAM_(log, log4cxx::Level::getWarn(), message); \
450 } \
451 } while (false)