|
LSSTApplications
11.0-13-gbb96280,12.1.rc1,12.1.rc1+1,12.1.rc1+2,12.1.rc1+5,12.1.rc1+8,12.1.rc1-1-g06d7636+1,12.1.rc1-1-g253890b+5,12.1.rc1-1-g3d31b68+7,12.1.rc1-1-g3db6b75+1,12.1.rc1-1-g5c1385a+3,12.1.rc1-1-g83b2247,12.1.rc1-1-g90cb4cf+6,12.1.rc1-1-g91da24b+3,12.1.rc1-2-g3521f8a,12.1.rc1-2-g39433dd+4,12.1.rc1-2-g486411b+2,12.1.rc1-2-g4c2be76,12.1.rc1-2-gc9c0491,12.1.rc1-2-gda2cd4f+6,12.1.rc1-3-g3391c73+2,12.1.rc1-3-g8c1bd6c+1,12.1.rc1-3-gcf4b6cb+2,12.1.rc1-4-g057223e+1,12.1.rc1-4-g19ed13b+2,12.1.rc1-4-g30492a7
LSSTDataManagementBasePackage
|
#include <Log.h>
Public Member Functions | |
| Log () | |
| bool | isDebugEnabled () const |
| bool | isErrorEnabled () const |
| bool | isFatalEnabled () const |
| bool | isInfoEnabled () const |
| bool | isTraceEnabled () const |
| bool | isWarnEnabled () const |
| std::string | getName () const |
| void | setLevel (int level) |
| int | getLevel () const |
| bool | isEnabledFor (int level) const |
| void | log (log4cxx::LevelPtr level, log4cxx::spi::LocationInfo const &location, char const *fmt,...) |
| void | logMsg (log4cxx::LevelPtr level, log4cxx::spi::LocationInfo const &location, std::string const &msg) |
Static Public Member Functions | |
| static Log | getDefaultLogger () |
| Return default logger instance, same as default constructor. More... | |
| static std::string | getDefaultLoggerName () |
| static void | configure () |
| static void | configure (std::string const &filename) |
| static void | configure_prop (std::string const &properties) |
| static Log | getLogger (Log const &logger) |
| static Log | getLogger (std::string const &loggername) |
| static void | pushContext (std::string const &name) |
| static void | popContext () |
| static void | MDC (std::string const &key, std::string const &value) |
| static void | MDCRemove (std::string const &key) |
| static int | MDCRegisterInit (std::function< void()> function) |
| static void | log (Log logger, log4cxx::LevelPtr level, log4cxx::spi::LocationInfo const &location, char const *fmt,...) |
| static void | logMsg (Log logger, log4cxx::LevelPtr level, log4cxx::spi::LocationInfo const &location, std::string const &msg) |
Private Member Functions | |
| Log (log4cxx::LoggerPtr const &logger) | |
Static Private Member Functions | |
| static log4cxx::LoggerPtr & | _defaultLogger () |
Private Attributes | |
| log4cxx::LoggerPtr | _logger |
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.
|
inlineprivate |
|
staticprivate |
|
static |
Explicitly configures log4cxx and initializes logging system.
Uses either default configuration or log4cxx basic configuration. Default 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 log4cxx BasicConfigurator class is used to configure, 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 "%-4r [%t] %-5p %c %x - %m%n".
Definition at line 165 of file Log.cc.
|
static |
Configures log4cxx from specified file.
If file name ends with ".xml", it is passed to log4cxx::xml::DOMConfigurator::configure(). Otherwise, it assumed to be a log4j Java properties file and is passed to log4cxx::PropertyConfigurator::configure(). See http://logging.apache.org/log4cxx/usage.html for additional details.
| filename | Path to configuration file. |
Definition at line 201 of file Log.cc.
|
static |
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.
| properties | Configuration properties. |
Definition at line 221 of file Log.cc.
|
inlinestatic |
|
static |
| int lsst::log::Log::getLevel | ( | ) | const |
|
static |
Returns logger object for a given name.
If name is empty then current logger is returned and not a root logger.
| loggername | Name of logger to return. |
Definition at line 261 of file Log.cc.
| std::string lsst::log::Log::getName | ( | ) | const |
|
inline |
| bool lsst::log::Log::isEnabledFor | ( | int | level | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Method used by LOG_INFO and similar macros to process a log message with variable arguments along with associated metadata.
| logger | the logger |
| level | message level |
| location | message origin location |
| fmt | message format string |
Definition at line 397 of file Log.cc.
| void lsst::log::Log::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.
| level | message level |
| location | message origin location |
| fmt | message format string |
Definition at line 382 of file Log.cc.
|
static |
| void lsst::log::Log::logMsg | ( | log4cxx::LevelPtr | level, |
| log4cxx::spi::LocationInfo const & | location, | ||
| std::string const & | msg | ||
| ) |
|
static |
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}.
| key | Unique key. |
| value | String value. |
|
static |
|
static |
|
static |
|
static |
| void lsst::log::Log::setLevel | ( | int | level | ) |
1.8.5