LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
#include <Log.h>
Static Public Member Functions | |
static void | initLog (void) |
static void | configure (void) |
static void | configure (std::string const &filename) |
static void | configure_prop (std::string const &properties) |
static std::string | getDefaultLoggerName (void) |
static log4cxx::LoggerPtr | getLogger (log4cxx::LoggerPtr logger) |
static log4cxx::LoggerPtr | getLogger (std::string const &loggername) |
static void | pushContext (std::string const &name) |
static void | popContext (void) |
static void | MDC (std::string const &key, std::string const &value) |
static void | MDCRemove (std::string const &key) |
static void | setLevel (log4cxx::LoggerPtr logger, int level) |
static void | setLevel (std::string const &loggername, int level) |
static int | getLevel (log4cxx::LoggerPtr logger) |
static int | getLevel (std::string const &loggername) |
static bool | isEnabledFor (log4cxx::LoggerPtr logger, int level) |
static bool | isEnabledFor (std::string const &loggername, int level) |
static void | vlog (log4cxx::LoggerPtr logger, log4cxx::LevelPtr level, std::string const &filename, std::string const &funcname, unsigned int lineno, char const *fmt, va_list args) |
static void | log (std::string const &loggername, log4cxx::LevelPtr level, std::string const &filename, std::string const &funcname, unsigned int lineno, char const *fmt,...) |
static void | log (log4cxx::LoggerPtr logger, log4cxx::LevelPtr level, std::string const &filename, std::string const &funcname, unsigned int lineno, char const *fmt,...) |
Static Public Attributes | |
static log4cxx::LoggerPtr | defaultLogger = log4cxx::Logger::getRootLogger() |
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.
|
static |
Configures log4cxx and initializes logging system by invoking initLog(). 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 119 of file Log.cc.
|
static |
Configures log4cxx using FILENAME and initializes logging module by invoking initLog(). If FILENAME 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 156 of file Log.cc.
|
static |
|
static |
|
static |
Retrieve the logging threshold for LOGGER.
logger | Logger with threshold to return. |
|
static |
Retrieve the logging threshold for the logger name LOGGERNAME.
loggername | Name of logger with threshold to return. |
Definition at line 315 of file Log.cc.
|
static |
|
static |
|
static |
|
static |
Return whether the logging threshold of LOGGER is less than or equal to LEVEL.
logger | Logger being queried. |
level | Logging threshold to check. |
|
static |
Return whether the logging threshold of the logger named LOGGERNAME is less than or equal to LEVEL.
loggername | Name of logger being queried. |
level | Logging threshold to check. |
Definition at line 341 of file Log.cc.
|
static |
loggername | name of logger |
level | message level |
filename | source filename |
funcname | source function name |
lineno | source line number |
fmt | message format string |
Definition at line 360 of file Log.cc.
|
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 |
filename | source filename |
funcname | source function name |
lineno | source line number |
fmt | message format string |
Definition at line 376 of file Log.cc.
|
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 |
|
static |
Set the logging threshold for the logger named LOGGERNAME to LEVEL.
loggername | Name of logger with threshold to adjust. |
level | New logging threshold. |
Definition at line 292 of file Log.cc.
|
static |
logger | the logger |
level | message level |
filename | source filename |
funcname | source function name |
lineno | source line number |
fmt | message format string |
args | message arguments |
Definition at line 345 of file Log.cc.
|
static |