This static class includes a variety of methods for interacting with the the logging module.
More...
|
| Log () |
|
bool | isDebugEnabled () const |
| Check whether the logger is enabled for the DEBUG Level. More...
|
|
bool | isErrorEnabled () const |
| Check whether the logger is enabled for the ERROR Level. More...
|
|
bool | isFatalEnabled () const |
| Check whether the logger is enabled for the FATAL Level. More...
|
|
bool | isInfoEnabled () const |
| Check whether the logger is enabled for the INFO Level. More...
|
|
bool | isTraceEnabled () const |
| Check whether the logger is enabled for the TRACE Level. More...
|
|
bool | isWarnEnabled () const |
| Check whether the logger is enabled for the WARN Level. More...
|
|
std::string | getName () const |
| Get the logger name associated with the Log object. More...
|
|
void | setLevel (int level) |
| Set the logging threshold to LEVEL. More...
|
|
int | getLevel () const |
| Retrieve the logging threshold. More...
|
|
bool | isEnabledFor (int level) const |
| Return whether the logging threshold of the logger is less than or equal to LEVEL. More...
|
|
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 with associated metadata. More...
|
|
void | logMsg (log4cxx::LevelPtr level, log4cxx::spi::LocationInfo const &location, std::string const &msg) |
| Method used by LOGS_INFO and similar macros to process a log message. More...
|
|
|
static Log | getDefaultLogger () |
| Return default logger instance, same as default constructor. More...
|
|
static std::string | getDefaultLoggerName () |
| Get the current default logger name. More...
|
|
static void | configure () |
| Explicitly configures log4cxx and initializes logging system. More...
|
|
static void | configure (std::string const &filename) |
| Configures log4cxx from specified file. More...
|
|
static void | configure_prop (std::string const &properties) |
| Configures log4cxx using a string containing the list of properties, equivalent to configuring from a file containing the same content but without creating temporary files. More...
|
|
static Log | getLogger (Log const &logger) |
|
static Log | getLogger (std::string const &loggername) |
| Returns logger object for a given name. More...
|
|
static void | pushContext (std::string const &name) |
| Pushes NAME onto the global hierarchical default logger name. More...
|
|
static void | popContext () |
| Pops the last pushed name off the global hierarchical default logger name. More...
|
|
static void | MDC (std::string const &key, std::string const &value) |
| Places a KEY/VALUE pair in the Mapped Diagnostic Context (MDC) for the current thread. More...
|
|
static void | MDCRemove (std::string const &key) |
| Remove the value associated with KEY within the MDC. More...
|
|
static int | MDCRegisterInit (std::function< void()> function) |
|
This static class includes a variety of methods for interacting with the the logging module.
These methods are not meant for direct use. Rather, they are used by the LOG* macros and the SWIG interface declared in logInterface.h.
Definition at line 723 of file Log.h.
void lsst::log::Log::configure |
( |
| ) |
|
|
static |
Explicitly configures log4cxx and initializes logging system.
Configuration can be specified via environment variable LSST_LOG_CONFIG, if it is set and specifies existing file name then this file name is used for configuration. Otherwise pre-defined configuration is used, which is hardwired to add to the root logger a ConsoleAppender. In this case, the output will be formatted using a PatternLayout set to the pattern "%c %p: %m%n".
Definition at line 173 of file Log.cc.