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);
This class is used to create the default implementation of the Logger class.
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
This is the central class in the log4cplus package.
This Interface is for attaching Appenders to objects.
The internal representation of logging events.
This is the central class in the log4cplus package.
virtual Hierarchy & getHierarchy() const
Return the the Hierarchy where this Logger instance is attached.
virtual void closeNestedAppenders()
Close all attached appenders implementing the AppenderAttachable interface.
LogLevel getLogLevel() const
Returns the assigned LogLevel, if any, for this Logger.
virtual LogLevel getChainedLogLevel() const
Starting from this logger, search the logger hierarchy for a "set" LogLevel and return it.
void setAdditivity(bool additive)
Set the additivity flag for this Logger instance.
bool getAdditivity() const
Get the additivity flag for this Logger instance.
log4cplus::tstring const & getName() const
Return the logger name.
helpers::SharedObjectPtr< LoggerImpl > SharedLoggerImplPtr
LoggerImpl(const log4cplus::tstring &name, Hierarchy &h)
This constructor created a new Logger instance and sets its name.
virtual void forcedLog(spi::InternalLoggingEvent const &ev)
LogLevel ll
The assigned LogLevel of this logger.
SharedLoggerImplPtr parent
The parent of this logger.
virtual bool isEnabledFor(LogLevel ll) const
Check whether this logger is enabled for a given LogLevel passed as parameter.
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.
bool additive
Additivity is set to true by default, that is children inherit the appenders of their ancestors by de...
virtual void log(spi::InternalLoggingEvent const &)
void setLogLevel(LogLevel _ll)
Set the LogLevel of this Logger.
log4cplus::tstring name
The name 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.
LoggerImpl::SharedLoggerImplPtr SharedLoggerImplPtr
std::basic_string< tchar > tstring
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL,...