Apache Log4cxx  Version 1.3.1
Loading...
Searching...
No Matches
log4cxx::Logger Class Reference

This is the central class in the log4cxx package. More...

#include <logger.h>

Inheritance diagram for log4cxx::Logger:
log4cxx::spi::AppenderAttachable log4cxx::helpers::Object log4cxx::spi::RootLogger

Public Member Functions

 Logger (const LogString &name)
 This constructor initializes a new logger instance and sets its name.
 
 Logger (helpers::Pool &pool, const LogString &name)
 
 ~Logger ()
 
void addAppender (const AppenderPtr newAppender) override
 Add newAppender to the list of appenders of this Logger instance.
 
void callAppenders (const spi::LoggingEventPtr &event, helpers::Pool &p) const
 Call the appenders in the hierrachy starting at this.
 
void closeNestedAppenders ()
 Close all attached appenders implementing the AppenderAttachable interface.
 
void debug (const std::string &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const std::string &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const std::wstring &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const std::basic_string< UniChar > &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.
 
void debug (const CFStringRef &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.
 
void error (const std::string &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const std::string &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const std::wstring &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const std::basic_string< UniChar > &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.
 
void error (const CFStringRef &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.
 
void fatal (const std::string &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const std::string &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const std::wstring &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const std::basic_string< UniChar > &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.
 
void fatal (const CFStringRef &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.
 
void addEvent (const LevelPtr &level, std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void addFatalEvent (std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new fatal level logging event containing message and location to attached appender(s) without further checks.
 
void addErrorEvent (std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new error level logging event containing message and location to attached appender(s) without further checks.
 
void addWarnEvent (std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new warning level logging event containing message and location to attached appender(s) without further checks.
 
void addInfoEvent (std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new info level logging event containing message and location to attached appender(s) without further checks.
 
void addDebugEvent (std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new debug level logging event containing message and location to attached appender(s) without further checks.
 
void addTraceEvent (std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new trace level logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const std::string &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const std::string &message) const
 Add a new logging event containing message to attached appender(s) without further checks.
 
void addEvent (const LevelPtr &level, std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void addFatalEvent (std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new fatal level logging event containing message and location to attached appender(s) without further checks.
 
void addErrorEvent (std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new error level logging event containing message and location to attached appender(s) without further checks.
 
void addWarnEvent (std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new warning level logging event containing message and location to attached appender(s) without further checks.
 
void addInfoEvent (std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new info level logging event containing message and location to attached appender(s) without further checks.
 
void addDebugEvent (std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new debug level logging event containing message and location to attached appender(s) without further checks.
 
void addTraceEvent (std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new trace level logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const std::wstring &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const std::wstring &message) const
 Add a new logging event containing message to attached appender(s) without further checks.
 
void addEvent (const LevelPtr &level, std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void addFatalEvent (std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new fatal level logging event containing message and location to attached appender(s) without further checks.
 
void addErrorEvent (std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new error level logging event containing message and location to attached appender(s) without further checks.
 
void addWarnEvent (std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new warning level logging event containing message and location to attached appender(s) without further checks.
 
void addInfoEvent (std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new info level logging event containing message and location to attached appender(s) without further checks.
 
void addDebugEvent (std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new debug level logging event containing message and location to attached appender(s) without further checks.
 
void addTraceEvent (std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new trace level logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const std::basic_string< UniChar > &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const std::basic_string< UniChar > &message) const
 Add a new logging event containing message to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const CFStringRef &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void forcedLog (const LevelPtr &level, const CFStringRef &message) const
 Add a new logging event containing message to attached appender(s) without further checks.
 
void addEventLS (const LevelPtr &level, LogString &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
void forcedLogLS (const LevelPtr &level, const LogString &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to attached appender(s) without further checks.
 
bool getAdditivity () const
 Get the additivity flag for this logger.
 
AppenderList getAllAppenders () const override
 Get the appenders contained in this logger as an AppenderList.
 
AppenderPtr getAppender (const LogString &name) const override
 Look for the appender named as name.
 
virtual const LevelPtrgetEffectiveLevel () const
 Starting from this logger, search the logger hierarchy for a non-null level and return it.
 
log4cxx::spi::LoggerRepositorygetLoggerRepository () const
 Return the the LoggerRepository where this Logger is attached.
 
const LogStringgetName () const
 Get the logger name.
 
void getName (std::string &name) const
 Put name of this logger into name in current encoding.
 
void getName (std::wstring &name) const
 Put name of this logger into name.
 
void getName (std::basic_string< UniChar > &name) const
 Put name of this logger into name.
 
void getName (CFStringRef &name) const
 Put name of this logger into name.
 
LoggerPtr getParent () const
 The parent of this logger.
 
const LevelPtrgetLevel () const
 The assigned Level, if any, for this logger.
 
helpers::ResourceBundlePtr getResourceBundle () const
 Return the inherited ResourceBundle for this logger.
 
void info (const std::string &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const std::string &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const std::wstring &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const std::basic_string< UniChar > &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
void info (const CFStringRef &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.
 
bool isAttached (const AppenderPtr appender) const override
 Is appender attached to this logger?
 
bool isDebugEnabled () const
 Is this logger is enabled for DEBUG level logging events?
 
bool isEnabledFor (const LevelPtr &level) const
 Is this logger is enabled for logging events at level?
 
bool isInfoEnabled () const
 Is this logger is enabled for INFO level logging events?
 
bool isWarnEnabled () const
 Is this logger is enabled for WARN level logging events?
 
bool isErrorEnabled () const
 Is this logger is enabled for ERROR level logging events?
 
bool isFatalEnabled () const
 Is this logger is enabled for FATAL level logging events?
 
bool isTraceEnabled () const
 Is this logger is enabled for TRACE level logging events?
 
void l7dlog (const LevelPtr &level, const LogString &key, const log4cxx::spi::LocationInfo &locationInfo, const std::vector< LogString > &values) const
 Add a new logging event containing locationInfo and the localized message key using values for parameter substitution to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo) const
 Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo, const std::string &val) const
 Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo, const std::string &val1, const std::string &val2) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo, const std::string &val1, const std::string &val2, const std::string &val3) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo) const
 Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo, const std::wstring &val) const
 Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo, const std::wstring &val1, const std::wstring &val2) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo, const std::wstring &val1, const std::wstring &val2, const std::wstring &val3) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::basic_string< UniChar > &key, const log4cxx::spi::LocationInfo &locationInfo) const
 Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::basic_string< UniChar > &key, const log4cxx::spi::LocationInfo &locationInfo, const std::basic_string< UniChar > &val) const
 Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::basic_string< UniChar > &key, const log4cxx::spi::LocationInfo &locationInfo, const std::basic_string< UniChar > &val1, const std::basic_string< UniChar > &val2) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const std::basic_string< UniChar > &key, const log4cxx::spi::LocationInfo &locationInfo, const std::basic_string< UniChar > &val1, const std::basic_string< UniChar > &val2, const std::basic_string< UniChar > &val3) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo) const
 Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1) const
 Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1, const CFStringRef &val2) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.
 
void l7dlog (const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1, const CFStringRef &val2, const CFStringRef &val3) const
 Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.
 
void log (const LevelPtr &level, const std::string &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const std::string &message) const
 Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const std::wstring &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const std::wstring &message) const
 Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const std::basic_string< UniChar > &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const std::basic_string< UniChar > &message) const
 Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const CFStringRef &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.
 
void log (const LevelPtr &level, const CFStringRef &message) const
 Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.
 
void logLS (const LevelPtr &level, const LogString &message, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.
 
void removeAllAppenders () override
 Remove all previously added appenders from this logger instance.
 
void removeAppender (const AppenderPtr appender) override
 Remove the appender passed as parameter form the list of appenders.
 
void removeAppender (const LogString &name) override
 Remove the appender with the name passed as parameter form the list of appenders.
 
void setAdditivity (bool additive)
 Set the additivity flag for this logger.
 
virtual void setLevel (const LevelPtr level)
 Set the level of this logger.
 
void setResourceBundle (const helpers::ResourceBundlePtr &bundle)
 Set the resource bundle to be used with localized logging methods.
 
void warn (const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const std::wstring &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const std::basic_string< UniChar > &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const CFStringRef &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const std::string &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void warn (const std::string &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.
 
void trace (const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const std::wstring &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const std::basic_string< UniChar > &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const CFStringRef &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const std::string &msg, const log4cxx::spi::LocationInfo &location) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void trace (const std::string &msg) const
 Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.
 
void reconfigure (const std::vector< AppenderPtr > &appenders, bool additivity)
 Reconfigure this logger by configuring all of the appenders.
 
- Public Member Functions inherited from log4cxx::spi::AppenderAttachable
virtual void addAppender (const AppenderPtr newAppender)=0
 Add an appender.
 
virtual AppenderList getAllAppenders () const =0
 Get all previously added appenders as an AppenderList.
 
virtual AppenderPtr getAppender (const LogString &name) const =0
 Get an appender by name.
 
virtual bool isAttached (const AppenderPtr appender) const =0
 Returns true if the specified appender is in list of attached appenders, false otherwise.
 
virtual void removeAllAppenders ()=0
 Remove all previously added appenders.
 
virtual void removeAppender (const AppenderPtr appender)=0
 Remove the appender passed as parameter from the list of appenders.
 
virtual void removeAppender (const LogString &name)=0
 Remove the appender with the name passed as parameter from the list of appenders.
 
virtual ~AppenderAttachable ()
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual const helpers::ClassgetClass () const =0
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Static Public Member Functions

static LoggerPtr getLogger (const std::string &name)
 Retrieve a logger by name in current encoding.
 
static LoggerPtr getLogger (const char *const name)
 Retrieve a logger by name in current encoding.
 
static LoggerPtr getLogger (const std::wstring &name)
 Retrieve a logger by name.
 
static LoggerPtr getLogger (const wchar_t *const name)
 Retrieve a logger by name.
 
static LoggerPtr getLogger (const std::basic_string< UniChar > &name)
 Retrieve a logger by name.
 
static LoggerPtr getLogger (const CFStringRef &name)
 Retrieve a logger by name.
 
static LoggerPtr getLoggerLS (const LogString &name)
 Retrieve a logger by name in Unicode.
 
static LoggerPtr getRootLogger ()
 Retrieve the root logger.
 
static LoggerPtr getLoggerLS (const LogString &name, const log4cxx::spi::LoggerFactoryPtr &factory)
 Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.
 
static LoggerPtr getLogger (const std::string &name, const log4cxx::spi::LoggerFactoryPtr &factory)
 Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.
 
static LoggerPtr getLogger (const std::wstring &name, const log4cxx::spi::LoggerFactoryPtr &factory)
 Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.
 
static LoggerPtr getLogger (const std::basic_string< UniChar > &name, const log4cxx::spi::LoggerFactoryPtr &factory)
 Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.
 
static LoggerPtr getLogger (const CFStringRef &name, const log4cxx::spi::LoggerFactoryPtr &factory)
 Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.
 
static bool isDebugEnabledFor (const LoggerPtr &logger)
 Is logger is enabled for DEBUG level logging events?
 
static bool isInfoEnabledFor (const LoggerPtr &logger)
 Is logger is enabled for INFO level logging events?
 
static bool isWarnEnabledFor (const LoggerPtr &logger)
 Is logger is enabled for WARN level logging events?
 
static bool isErrorEnabledFor (const LoggerPtr &logger)
 Is logger is enabled for ERROR level logging events?
 
static bool isFatalEnabledFor (const LoggerPtr &logger)
 Is logger is enabled for FATAL level logging events?
 
static bool isTraceEnabledFor (const LoggerPtr &logger)
 Is logger is enabled for TRACE level logging events?
 

Protected Member Functions

LogString getResourceBundleString (const LogString &key) const
 Returns the string resource corresponding to key in this logger's inherited resource bundle.
 
void removeHierarchy ()
 Only the Hierarchy class can remove the hierarchy of a logger.
 
void setHierarchy (spi::LoggerRepository *repository)
 Only the Hierarchy class can set the hierarchy of a logger.
 
void setParent (LoggerPtr parentLogger)
 Only the Hierarchy class can set the parent of a logger.
 
void updateThreshold ()
 Only the Hierarchy class can change the threshold of a logger.
 

Friends

class Hierarchy
 

Detailed Description

This is the central class in the log4cxx package.

Most logging operations, except configuration, are done through this class.

Constructor & Destructor Documentation

◆ Logger() [1/2]

log4cxx::Logger::Logger ( const LogString name)

This constructor initializes a new logger instance and sets its name.

It is intended to be only used by factory-classes.

◆ Logger() [2/2]

log4cxx::Logger::Logger ( helpers::Pool pool,
const LogString name 
)

◆ ~Logger()

log4cxx::Logger::~Logger ( )

Member Function Documentation

◆ addAppender()

void log4cxx::Logger::addAppender ( const AppenderPtr  newAppender)
overridevirtual

Add newAppender to the list of appenders of this Logger instance.

If newAppender is already in the list of appenders, then it won't be added again.

Implements log4cxx::spi::AppenderAttachable.

◆ addDebugEvent() [1/3]

void log4cxx::Logger::addDebugEvent ( std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new debug level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addDebugEvent() [2/3]

void log4cxx::Logger::addDebugEvent ( std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new debug level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addDebugEvent() [3/3]

void log4cxx::Logger::addDebugEvent ( std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new debug level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addErrorEvent() [1/3]

void log4cxx::Logger::addErrorEvent ( std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new error level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addErrorEvent() [2/3]

void log4cxx::Logger::addErrorEvent ( std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new error level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addErrorEvent() [3/3]

void log4cxx::Logger::addErrorEvent ( std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new error level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addEvent() [1/3]

void log4cxx::Logger::addEvent ( const LevelPtr level,
std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addEvent() [2/3]

void log4cxx::Logger::addEvent ( const LevelPtr level,
std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addEvent() [3/3]

void log4cxx::Logger::addEvent ( const LevelPtr level,
std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addEventLS()

void log4cxx::Logger::addEventLS ( const LevelPtr level,
LogString &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messagethe message string to log.
locationlocation of the logging statement.

◆ addFatalEvent() [1/3]

void log4cxx::Logger::addFatalEvent ( std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new fatal level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addFatalEvent() [2/3]

void log4cxx::Logger::addFatalEvent ( std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new fatal level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addFatalEvent() [3/3]

void log4cxx::Logger::addFatalEvent ( std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new fatal level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addInfoEvent() [1/3]

void log4cxx::Logger::addInfoEvent ( std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new info level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addInfoEvent() [2/3]

void log4cxx::Logger::addInfoEvent ( std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new info level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addInfoEvent() [3/3]

void log4cxx::Logger::addInfoEvent ( std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new info level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addTraceEvent() [1/3]

void log4cxx::Logger::addTraceEvent ( std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new trace level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addTraceEvent() [2/3]

void log4cxx::Logger::addTraceEvent ( std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new trace level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addTraceEvent() [3/3]

void log4cxx::Logger::addTraceEvent ( std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new trace level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addWarnEvent() [1/3]

void log4cxx::Logger::addWarnEvent ( std::basic_string< UniChar > &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new warning level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addWarnEvent() [2/3]

void log4cxx::Logger::addWarnEvent ( std::string &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new warning level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ addWarnEvent() [3/3]

void log4cxx::Logger::addWarnEvent ( std::wstring &&  message,
const spi::LocationInfo location = spi::LocationInfo::getLocationUnavailable() 
) const

Add a new warning level logging event containing message and location to attached appender(s) without further checks.

Parameters
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ callAppenders()

void log4cxx::Logger::callAppenders ( const spi::LoggingEventPtr event,
helpers::Pool p 
) const

Call the appenders in the hierrachy starting at this.

If no appenders could be found, emit a warning.

This method calls all the appenders inherited from the hierarchy circumventing any evaluation of whether to log or not to log the particular log request.

Parameters
eventthe event to log.
pmemory pool for any allocations needed to process request.

◆ closeNestedAppenders()

void log4cxx::Logger::closeNestedAppenders ( )

Close all attached appenders implementing the AppenderAttachable interface.

◆ debug() [1/8]

void log4cxx::Logger::debug ( const CFStringRef msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_DEBUG.

◆ debug() [2/8]

void log4cxx::Logger::debug ( const CFStringRef msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_DEBUG.

◆ debug() [3/8]

void log4cxx::Logger::debug ( const std::basic_string< UniChar > &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_DEBUG.

◆ debug() [4/8]

void log4cxx::Logger::debug ( const std::basic_string< UniChar > &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_DEBUG.

◆ debug() [5/8]

void log4cxx::Logger::debug ( const std::string &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_DEBUG.

◆ debug() [6/8]

void log4cxx::Logger::debug ( const std::string &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

◆ debug() [7/8]

void log4cxx::Logger::debug ( const std::wstring &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_DEBUG.

◆ debug() [8/8]

void log4cxx::Logger::debug ( const std::wstring &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for DEBUG events.

This method first checks if this logger is DEBUG enabled by comparing the level of this logger with the DEBUG level. If this logger is DEBUG enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_DEBUG.

◆ error() [1/8]

void log4cxx::Logger::error ( const CFStringRef msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_ERROR.

◆ error() [2/8]

void log4cxx::Logger::error ( const CFStringRef msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_ERROR.

◆ error() [3/8]

void log4cxx::Logger::error ( const std::basic_string< UniChar > &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_ERROR.

◆ error() [4/8]

void log4cxx::Logger::error ( const std::basic_string< UniChar > &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_ERROR.

◆ error() [5/8]

void log4cxx::Logger::error ( const std::string &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_ERROR.

◆ error() [6/8]

void log4cxx::Logger::error ( const std::string &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_ERROR.

◆ error() [7/8]

void log4cxx::Logger::error ( const std::wstring &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_ERROR.

◆ error() [8/8]

void log4cxx::Logger::error ( const std::wstring &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for ERROR events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_ERROR.

◆ fatal() [1/8]

void log4cxx::Logger::fatal ( const CFStringRef msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_FATAL.

◆ fatal() [2/8]

void log4cxx::Logger::fatal ( const CFStringRef msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_FATAL.

◆ fatal() [3/8]

void log4cxx::Logger::fatal ( const std::basic_string< UniChar > &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_FATAL.

◆ fatal() [4/8]

void log4cxx::Logger::fatal ( const std::basic_string< UniChar > &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_FATAL.

◆ fatal() [5/8]

void log4cxx::Logger::fatal ( const std::string &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_FATAL.

◆ fatal() [6/8]

void log4cxx::Logger::fatal ( const std::string &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is FATAL enabled by comparing the level of this logger with the FATAL level. If this logger is FATAL enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_FATAL.

◆ fatal() [7/8]

void log4cxx::Logger::fatal ( const std::wstring &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_FATAL.

◆ fatal() [8/8]

void log4cxx::Logger::fatal ( const std::wstring &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg and location to attached appender(s) if this logger is enabled for FATAL events.

This method first checks if this logger is ERROR enabled by comparing the level of this logger with the ERROR level. If this logger is ERROR enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_FATAL.

◆ forcedLog() [1/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const CFStringRef message 
) const

Add a new logging event containing message to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.

◆ forcedLog() [2/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const CFStringRef message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ forcedLog() [3/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const std::basic_string< UniChar > &  message 
) const

Add a new logging event containing message to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.

◆ forcedLog() [4/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const std::basic_string< UniChar > &  message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ forcedLog() [5/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const std::string &  message 
) const

Add a new logging event containing message to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.

◆ forcedLog() [6/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const std::string &  message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ forcedLog() [7/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const std::wstring &  message 
) const

Add a new logging event containing message to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.

◆ forcedLog() [8/8]

void log4cxx::Logger::forcedLog ( const LevelPtr level,
const std::wstring &  message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messageThe text to add to the logging event.
locationThe source code location of the logging request.

◆ forcedLogLS()

void log4cxx::Logger::forcedLogLS ( const LevelPtr level,
const LogString message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to attached appender(s) without further checks.

Parameters
levelThe logging event level.
messagethe message string to log.
locationlocation of the logging statement.

◆ getAdditivity()

bool log4cxx::Logger::getAdditivity ( ) const

Get the additivity flag for this logger.

◆ getAllAppenders()

AppenderList log4cxx::Logger::getAllAppenders ( ) const
overridevirtual

Get the appenders contained in this logger as an AppenderList.

If no appenders can be found, then an empty AppenderList is returned.

Returns
AppenderList An collection of the appenders in this logger.

Implements log4cxx::spi::AppenderAttachable.

◆ getAppender()

AppenderPtr log4cxx::Logger::getAppender ( const LogString name) const
overridevirtual

Look for the appender named as name.

Return the appender with that name if in the list. Return NULL otherwise.

Implements log4cxx::spi::AppenderAttachable.

◆ getEffectiveLevel()

virtual const LevelPtr & log4cxx::Logger::getEffectiveLevel ( ) const
virtual

Starting from this logger, search the logger hierarchy for a non-null level and return it.

The Logger class is designed so that this method executes as quickly as possible.

Exceptions
RuntimeExceptionif all levels are null in the hierarchy

Reimplemented in log4cxx::spi::RootLogger.

◆ getLevel()

const LevelPtr & log4cxx::Logger::getLevel ( ) const

The assigned Level, if any, for this logger.

Returns
Level - the assigned Level, can be null.

◆ getLogger() [1/10]

static LoggerPtr log4cxx::Logger::getLogger ( const CFStringRef name)
static

Retrieve a logger by name.

Parameters
namelogger name.

◆ getLogger() [2/10]

static LoggerPtr log4cxx::Logger::getLogger ( const CFStringRef name,
const log4cxx::spi::LoggerFactoryPtr factory 
)
static

Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.

This method is intended to be used by sub-classes.

Parameters
nameThe name of the logger to retrieve.
factoryA LoggerFactory implementation that will actually create a new Instance.

◆ getLogger() [3/10]

static LoggerPtr log4cxx::Logger::getLogger ( const char *const  name)
static

Retrieve a logger by name in current encoding.

Parameters
namelogger name.

◆ getLogger() [4/10]

static LoggerPtr log4cxx::Logger::getLogger ( const std::basic_string< UniChar > &  name)
static

Retrieve a logger by name.

Parameters
namelogger name.

◆ getLogger() [5/10]

static LoggerPtr log4cxx::Logger::getLogger ( const std::basic_string< UniChar > &  name,
const log4cxx::spi::LoggerFactoryPtr factory 
)
static

Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.

This method is intended to be used by sub-classes.

Parameters
nameThe name of the logger to retrieve.
factoryA LoggerFactory implementation that will actually create a new Instance.

◆ getLogger() [6/10]

static LoggerPtr log4cxx::Logger::getLogger ( const std::string &  name)
static

Retrieve a logger by name in current encoding.

Parameters
namelogger name.

◆ getLogger() [7/10]

static LoggerPtr log4cxx::Logger::getLogger ( const std::string &  name,
const log4cxx::spi::LoggerFactoryPtr factory 
)
static

Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.

This method is intended to be used by sub-classes.

Parameters
nameThe name of the logger to retrieve.
factoryA LoggerFactory implementation that will actually create a new Instance.

◆ getLogger() [8/10]

static LoggerPtr log4cxx::Logger::getLogger ( const std::wstring &  name)
static

Retrieve a logger by name.

Parameters
namelogger name.

◆ getLogger() [9/10]

static LoggerPtr log4cxx::Logger::getLogger ( const std::wstring &  name,
const log4cxx::spi::LoggerFactoryPtr factory 
)
static

Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.

This method is intended to be used by sub-classes.

Parameters
nameThe name of the logger to retrieve.
factoryA LoggerFactory implementation that will actually create a new Instance.

◆ getLogger() [10/10]

static LoggerPtr log4cxx::Logger::getLogger ( const wchar_t *const  name)
static

Retrieve a logger by name.

Parameters
namelogger name.

◆ getLoggerLS() [1/2]

static LoggerPtr log4cxx::Logger::getLoggerLS ( const LogString name)
static

Retrieve a logger by name in Unicode.

Parameters
namelogger name.

◆ getLoggerLS() [2/2]

static LoggerPtr log4cxx::Logger::getLoggerLS ( const LogString name,
const log4cxx::spi::LoggerFactoryPtr factory 
)
static

Like getLogger except that the type of logger instantiated depends on the type returned by the LoggerFactory::makeNewLoggerInstance method of the factory parameter.

This method is intended to be used by sub-classes.

Parameters
nameThe name of the logger to retrieve.
factoryA LoggerFactory implementation that will actually create a new Instance.

◆ getLoggerRepository()

log4cxx::spi::LoggerRepository * log4cxx::Logger::getLoggerRepository ( ) const

Return the the LoggerRepository where this Logger is attached.

◆ getName() [1/5]

const LogString & log4cxx::Logger::getName ( ) const

Get the logger name.

Returns
logger name as LogString.

◆ getName() [2/5]

void log4cxx::Logger::getName ( CFStringRef name) const

Put name of this logger into name.

Parameters
namebuffer to which name is appended.

◆ getName() [3/5]

void log4cxx::Logger::getName ( std::basic_string< UniChar > &  name) const

Put name of this logger into name.

Parameters
namebuffer to which name is appended.

◆ getName() [4/5]

void log4cxx::Logger::getName ( std::string &  name) const

Put name of this logger into name in current encoding.

Parameters
namebuffer to which name is appended.

◆ getName() [5/5]

void log4cxx::Logger::getName ( std::wstring &  name) const

Put name of this logger into name.

Parameters
namebuffer to which name is appended.

◆ getParent()

LoggerPtr log4cxx::Logger::getParent ( ) const

The parent of this logger.

Note that the parent of a given logger may change during the lifetime of the logger.

The root logger will return 0.

◆ getResourceBundle()

helpers::ResourceBundlePtr log4cxx::Logger::getResourceBundle ( ) const

Return the inherited ResourceBundle for this logger.

This method walks the hierarchy to find the appropriate resource bundle. It will return the resource bundle attached to the closest ancestor of this logger, much like the way priorities are searched. In case there is no bundle in the hierarchy then NULL is returned.

◆ getResourceBundleString()

LogString log4cxx::Logger::getResourceBundleString ( const LogString key) const
protected

Returns the string resource corresponding to key in this logger's inherited resource bundle.

If the resource cannot be found, then an error message will be logged complaining about the missing resource.

See also
getResourceBundle.

◆ getRootLogger()

static LoggerPtr log4cxx::Logger::getRootLogger ( )
static

Retrieve the root logger.

◆ info() [1/8]

void log4cxx::Logger::info ( const CFStringRef msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_INFO.

◆ info() [2/8]

void log4cxx::Logger::info ( const CFStringRef msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_INFO.

◆ info() [3/8]

void log4cxx::Logger::info ( const std::basic_string< UniChar > &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_INFO.

◆ info() [4/8]

void log4cxx::Logger::info ( const std::basic_string< UniChar > &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

◆ info() [5/8]

void log4cxx::Logger::info ( const std::string &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_INFO.

◆ info() [6/8]

void log4cxx::Logger::info ( const std::string &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_INFO.

◆ info() [7/8]

void log4cxx::Logger::info ( const std::wstring &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_INFO.

◆ info() [8/8]

void log4cxx::Logger::info ( const std::wstring &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO events.

This method first checks if this logger is INFO enabled by comparing the level of this logger with the INFO level. If this logger is INFO enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_INFO.

◆ isAttached()

bool log4cxx::Logger::isAttached ( const AppenderPtr  appender) const
overridevirtual

Is appender attached to this logger?

Implements log4cxx::spi::AppenderAttachable.

◆ isDebugEnabled()

bool log4cxx::Logger::isDebugEnabled ( ) const

Is this logger is enabled for DEBUG level logging events?

By writing

if(logger->isDebugEnabled()) {
logger->debug("Component: " + std::to_string(componentNumber));
}

you will not incur the cost of parameter construction (integer to string conversion plus string concatonation in this case) if debugging is disabled for logger. You avoid the cost constructing the message when the message is not logged.

This function allows you to reduce the computational cost of disabled log debug statements compared to writing:

logger->debug("Component: " + std::to_string(componentNumber));

On the other hand, if the logger is enabled for DEBUG logging events, you will incur the cost of evaluating whether the logger is enabled twice, once in isDebugEnabled and once in the DEBUG. This really is an insignificant overhead since evaluating a the enabled status takes about 1% of the time it takes to send the message to the appender.

See also isDebugEnabledFor. See also LOG4CXX_DEBUG.

Returns
bool - true if this logger is debug enabled, false otherwise.

◆ isDebugEnabledFor()

static bool log4cxx::Logger::isDebugEnabledFor ( const LoggerPtr logger)
inlinestatic

Is logger is enabled for DEBUG level logging events?

By writing

logger->addDebugEvent("Component: " + std::to_string(componentNumber));
}
static bool isDebugEnabledFor(const LoggerPtr &logger)
Is logger is enabled for DEBUG level logging events?
Definition: log4cxx/logger.h:1187

you minimise the computational cost when logger is not enabled for DEBUG logging events. This function may be inlined thereby avoiding a function call as well as the cost constructing the message when logger is not enabled for DEBUG events.

See also LOG4CXX_DEBUG.

Returns
bool - false if logger is null or DEBUG logging events are disabled for logger, true otherwise.

◆ isEnabledFor()

bool log4cxx::Logger::isEnabledFor ( const LevelPtr level) const

Is this logger is enabled for logging events at level?

Returns
bool True if this logger is enabled for level logging events.

◆ isErrorEnabled()

bool log4cxx::Logger::isErrorEnabled ( ) const

Is this logger is enabled for ERROR level logging events?

See also isDebugEnabled. See also LOG4CXX_ERROR.

Returns
bool - true if this logger is enabled for level error, false otherwise.

◆ isErrorEnabledFor()

static bool log4cxx::Logger::isErrorEnabledFor ( const LoggerPtr logger)
inlinestatic

Is logger is enabled for ERROR level logging events?

See isDebugEnabledFor. See also LOG4CXX_ERROR.

Returns
bool - false if logger is null or ERROR logging events are disabled for logger, true otherwise.

◆ isFatalEnabled()

bool log4cxx::Logger::isFatalEnabled ( ) const

Is this logger is enabled for FATAL level logging events?

See also isDebugEnabled. See also LOG4CXX_FATAL.

Returns
bool - true if this logger is enabled for level fatal, false otherwise.

◆ isFatalEnabledFor()

static bool log4cxx::Logger::isFatalEnabledFor ( const LoggerPtr logger)
inlinestatic

Is logger is enabled for FATAL level logging events?

See isDebugEnabledFor. See also LOG4CXX_FATAL.

Returns
bool - false if logger is null or FATAL logging events are disabled for logger, true otherwise.

◆ isInfoEnabled()

bool log4cxx::Logger::isInfoEnabled ( ) const

Is this logger is enabled for INFO level logging events?

See isDebugEnabled. See also LOG4CXX_INFO.

Returns
bool - true if this logger is enabled for level info, false otherwise.

◆ isInfoEnabledFor()

static bool log4cxx::Logger::isInfoEnabledFor ( const LoggerPtr logger)
inlinestatic

Is logger is enabled for INFO level logging events?

See isDebugEnabledFor. See also LOG4CXX_INFO.

Returns
bool - false if logger is null or INFO logging events are disabled for logger, true otherwise.

◆ isTraceEnabled()

bool log4cxx::Logger::isTraceEnabled ( ) const

Is this logger is enabled for TRACE level logging events?

See also isDebugEnabled. See also LOG4CXX_FATAL.

Returns
bool - true if this logger is enabled for level trace, false otherwise.

◆ isTraceEnabledFor()

static bool log4cxx::Logger::isTraceEnabledFor ( const LoggerPtr logger)
inlinestatic

Is logger is enabled for TRACE level logging events?

See isDebugEnabledFor. See also LOG4CXX_TRACE.

Returns
bool - false if logger is null or TRACE logging events are disabled for logger, true otherwise.

◆ isWarnEnabled()

bool log4cxx::Logger::isWarnEnabled ( ) const

Is this logger is enabled for WARN level logging events?

See also isDebugEnabled. See also LOG4CXX_WARN.

Returns
bool - true if this logger is enabled for level warn, false otherwise.

◆ isWarnEnabledFor()

static bool log4cxx::Logger::isWarnEnabledFor ( const LoggerPtr logger)
inlinestatic

Is logger is enabled for WARN level logging events?

See isDebugEnabledFor. See also LOG4CXX_WARN.

Returns
bool - false if logger is null or WARN logging events are disabled for logger, true otherwise.

◆ l7dlog() [1/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const CFStringRef key,
const log4cxx::spi::LocationInfo locationInfo 
) const

Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
See also
setResourceBundle

See also LOG4CXX_L7DLOG.

◆ l7dlog() [2/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const CFStringRef key,
const log4cxx::spi::LocationInfo locationInfo,
const CFStringRef val1 
) const

Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameter in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG1.

◆ l7dlog() [3/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const CFStringRef key,
const log4cxx::spi::LocationInfo locationInfo,
const CFStringRef val1,
const CFStringRef val2 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG2.

◆ l7dlog() [4/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const CFStringRef key,
const log4cxx::spi::LocationInfo locationInfo,
const CFStringRef val1,
const CFStringRef val2,
const CFStringRef val3 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
val3The value for the third placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG3.

◆ l7dlog() [5/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const LogString key,
const log4cxx::spi::LocationInfo locationInfo,
const std::vector< LogString > &  values 
) const

Add a new logging event containing locationInfo and the localized message key using values for parameter substitution to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
valuesThe values for the placeholders {0}, {1} etc. within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG1.

◆ l7dlog() [6/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::basic_string< UniChar > &  key,
const log4cxx::spi::LocationInfo locationInfo 
) const

Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
See also
setResourceBundle

See also LOG4CXX_L7DLOG.

◆ l7dlog() [7/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::basic_string< UniChar > &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::basic_string< UniChar > &  val 
) const

Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameter in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
valThe value for the first placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG1.

◆ l7dlog() [8/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::basic_string< UniChar > &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::basic_string< UniChar > &  val1,
const std::basic_string< UniChar > &  val2 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG2.

◆ l7dlog() [9/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::basic_string< UniChar > &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::basic_string< UniChar > &  val1,
const std::basic_string< UniChar > &  val2,
const std::basic_string< UniChar > &  val3 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
val3The value for the third placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG3.

◆ l7dlog() [10/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::string &  key,
const log4cxx::spi::LocationInfo locationInfo 
) const

Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
See also
setResourceBundle

See also LOG4CXX_L7DLOG.

◆ l7dlog() [11/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::string &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::string &  val 
) const

Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
valThe first value for the placeholders within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG1.

◆ l7dlog() [12/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::string &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::string &  val1,
const std::string &  val2 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The first value for the placeholders within the pattern.
val2The second value for the placeholders within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG2.

◆ l7dlog() [13/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::string &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::string &  val1,
const std::string &  val2,
const std::string &  val3 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
val3The value for the third placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG3.

◆ l7dlog() [14/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::wstring &  key,
const log4cxx::spi::LocationInfo locationInfo 
) const

Add a new logging event containing locationInfo and the localized message key to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method .

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
See also
setResourceBundle

See also LOG4CXX_L7DLOG.

◆ l7dlog() [15/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::wstring &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::wstring &  val 
) const

Add a new logging event containing locationInfo and the localized message key using parameter val to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameter in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
valThe value for the first placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG1.

◆ l7dlog() [16/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::wstring &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::wstring &  val1,
const std::wstring &  val2 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1 and val2 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG2.

◆ l7dlog() [17/17]

void log4cxx::Logger::l7dlog ( const LevelPtr level,
const std::wstring &  key,
const log4cxx::spi::LocationInfo locationInfo,
const std::wstring &  val1,
const std::wstring &  val2,
const std::wstring &  val3 
) const

Add a new logging event containing locationInfo and the localized message key using parameters val1, val2 and val3 to attached appender(s) if this logger is enabled for level events.

First, the user supplied key is searched in the resource bundle. Next, the resulting pattern is formatted using helpers::StringHelper::format method with the supplied parameters in a string array.

Parameters
levelThe level of the logging request.
keyThe key to be searched in the ResourceBundle.
locationInfoThe location info of the logging request.
val1The value for the first placeholder within the pattern.
val2The value for the second placeholder within the pattern.
val3The value for the third placeholder within the pattern.
See also
setResourceBundle

See also LOG4CXX_L7DLOG3.

◆ log() [1/8]

void log4cxx::Logger::log ( const LevelPtr level,
const CFStringRef message 
) const

Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.

◆ log() [2/8]

void log4cxx::Logger::log ( const LevelPtr level,
const CFStringRef message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.
locationThe source file of the logging request, may be null.

◆ log() [3/8]

void log4cxx::Logger::log ( const LevelPtr level,
const std::basic_string< UniChar > &  message 
) const

Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.

◆ log() [4/8]

void log4cxx::Logger::log ( const LevelPtr level,
const std::basic_string< UniChar > &  message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.
locationThe source file of the logging request, may be null.

◆ log() [5/8]

void log4cxx::Logger::log ( const LevelPtr level,
const std::string &  message 
) const

Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.

◆ log() [6/8]

void log4cxx::Logger::log ( const LevelPtr level,
const std::string &  message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.
locationThe source file of the logging request, may be null.

◆ log() [7/8]

void log4cxx::Logger::log ( const LevelPtr level,
const std::wstring &  message 
) const

Add a new logging event containing message to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.

◆ log() [8/8]

void log4cxx::Logger::log ( const LevelPtr level,
const std::wstring &  message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.
locationThe source file of the logging request, may be null.

◆ logLS()

void log4cxx::Logger::logLS ( const LevelPtr level,
const LogString message,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing message and location to the appenders attached to this logger if this logger is enabled for level events.

This is the most generic printing method. It is intended to be invoked by wrapper classes.

Parameters
levelThe level of the logging request.
messageThe message of the logging request.
locationThe source file of the logging request, may be null.

◆ reconfigure()

void log4cxx::Logger::reconfigure ( const std::vector< AppenderPtr > &  appenders,
bool  additivity 
)

Reconfigure this logger by configuring all of the appenders.

Parameters
appendersThe appenders to set. Any currently existing appenders are removed.
additivityThe additivity of this logger

◆ removeAllAppenders()

void log4cxx::Logger::removeAllAppenders ( )
overridevirtual

Remove all previously added appenders from this logger instance.

This is useful when re-reading configuration information.

Implements log4cxx::spi::AppenderAttachable.

◆ removeAppender() [1/2]

void log4cxx::Logger::removeAppender ( const AppenderPtr  appender)
overridevirtual

Remove the appender passed as parameter form the list of appenders.

Implements log4cxx::spi::AppenderAttachable.

◆ removeAppender() [2/2]

void log4cxx::Logger::removeAppender ( const LogString name)
overridevirtual

Remove the appender with the name passed as parameter form the list of appenders.

Implements log4cxx::spi::AppenderAttachable.

◆ removeHierarchy()

void log4cxx::Logger::removeHierarchy ( )
protected

Only the Hierarchy class can remove the hierarchy of a logger.

◆ setAdditivity()

void log4cxx::Logger::setAdditivity ( bool  additive)

Set the additivity flag for this logger.

◆ setHierarchy()

void log4cxx::Logger::setHierarchy ( spi::LoggerRepository repository)
protected

Only the Hierarchy class can set the hierarchy of a logger.

◆ setLevel()

virtual void log4cxx::Logger::setLevel ( const LevelPtr  level)
virtual

Set the level of this logger.

As in logger->setLevel(Level::getDebug());

Null values are admitted.

Reimplemented in log4cxx::spi::RootLogger.

◆ setParent()

void log4cxx::Logger::setParent ( LoggerPtr  parentLogger)
protected

Only the Hierarchy class can set the parent of a logger.

◆ setResourceBundle()

void log4cxx::Logger::setResourceBundle ( const helpers::ResourceBundlePtr &  bundle)

Set the resource bundle to be used with localized logging methods.

◆ trace() [1/8]

void log4cxx::Logger::trace ( const CFStringRef msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_TRACE.

◆ trace() [2/8]

void log4cxx::Logger::trace ( const CFStringRef msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_TRACE.

◆ trace() [3/8]

void log4cxx::Logger::trace ( const std::basic_string< UniChar > &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_TRACE.

◆ trace() [4/8]

void log4cxx::Logger::trace ( const std::basic_string< UniChar > &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_TRACE.

◆ trace() [5/8]

void log4cxx::Logger::trace ( const std::string &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_TRACE.

◆ trace() [6/8]

void log4cxx::Logger::trace ( const std::string &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_TRACE.

◆ trace() [7/8]

void log4cxx::Logger::trace ( const std::wstring &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_TRACE.

◆ trace() [8/8]

void log4cxx::Logger::trace ( const std::wstring &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE events.

This method first checks if this logger is TRACE enabled by comparing the level of this logger with the TRACE level. If this logger is TRACE enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_TRACE.

◆ updateThreshold()

void log4cxx::Logger::updateThreshold ( )
protected

Only the Hierarchy class can change the threshold of a logger.

◆ warn() [1/8]

void log4cxx::Logger::warn ( const CFStringRef msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_WARN.

◆ warn() [2/8]

void log4cxx::Logger::warn ( const CFStringRef msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_WARN.

◆ warn() [3/8]

void log4cxx::Logger::warn ( const std::basic_string< UniChar > &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_WARN.

◆ warn() [4/8]

void log4cxx::Logger::warn ( const std::basic_string< UniChar > &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_WARN.

◆ warn() [5/8]

void log4cxx::Logger::warn ( const std::string &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_WARN.

◆ warn() [6/8]

void log4cxx::Logger::warn ( const std::string &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_WARN.

◆ warn() [7/8]

void log4cxx::Logger::warn ( const std::wstring &  msg) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.

See also LOG4CXX_WARN.

◆ warn() [8/8]

void log4cxx::Logger::warn ( const std::wstring &  msg,
const log4cxx::spi::LocationInfo location 
) const

Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN events.

This method first checks if this logger is WARN enabled by comparing the level of this logger with the WARN level. If this logger is WARN enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag.

Parameters
msgthe message string to log.
locationThe source code location of the logging request.

See also LOG4CXX_WARN.

Friends And Related Function Documentation

◆ Hierarchy

friend class Hierarchy
friend

The documentation for this class was generated from the following file: