 |
log4cplus
2.0.5
|
Go to the documentation of this file.
24 #ifndef LOG4CPLUS_SPI_LOGGER_HEADER_
25 #define LOG4CPLUS_SPI_LOGGER_HEADER_
29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
42 class DefaultLoggerFactory;
91 const char* file=
nullptr,
int line=-1,
92 const char*
function=
nullptr);
165 const char*
function);
216 #endif // LOG4CPLUS_SPI_LOGGER_HEADER_
virtual void callAppenders(const InternalLoggingEvent &event)
Call the appenders in the hierrachy starting at this.
virtual void log(LogLevel ll, const log4cplus::tstring &message, const char *file=nullptr, int line=-1, const char *function=nullptr)
This generic form is intended to be used by wrappers.
This Interface is for attaching Appenders to objects.
std::basic_string< tchar > tstring
LoggerImpl(const log4cplus::tstring &name, Hierarchy &h)
This constructor created a new Logger instance and sets its name.
virtual void log(spi::InternalLoggingEvent const &)
This is the central class in the log4cplus package.
void setLogLevel(LogLevel _ll)
Set the LogLevel of this Logger.
virtual void forcedLog(LogLevel ll, const log4cplus::tstring &message, const char *file, int line, const char *function)
This method creates a new logging event and logs the event without further checks.
log4cplus::tstring name
The name of this logger.
bool additive
Additivity is set to true by default, that is children inherit the appenders of their ancestors by de...
log4cplus::tstring const & getName() const
Return the logger name.
SharedLoggerImplPtr parent
The parent of this logger.
virtual void closeNestedAppenders()
Close all attached appenders implementing the AppenderAttachable interface.
void setAdditivity(bool additive)
Set the additivity flag for this Logger instance.
virtual void forcedLog(spi::InternalLoggingEvent const &ev)
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
bool getAdditivity() const
Get the additivity flag for this Logger instance.
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL,...
LogLevel ll
The assigned LogLevel of this logger.
virtual bool isEnabledFor(LogLevel ll) const
Check whether this logger is enabled for a given LogLevel passed as parameter.
LoggerImpl::SharedLoggerImplPtr SharedLoggerImplPtr
The internal representation of logging events.
virtual Hierarchy & getHierarchy() const
Return the the Hierarchy where this Logger instance is attached.
helpers::SharedObjectPtr< LoggerImpl > SharedLoggerImplPtr
virtual LogLevel getChainedLogLevel() const
Starting from this logger, search the logger hierarchy for a "set" LogLevel and return it.
LogLevel getLogLevel() const
Returns the assigned LogLevel, if any, for this Logger.
This class is used to create the default implementation of the Logger class.
This is the central class in the log4cplus package.