18#ifndef _LOG4CXX_LOGGER_H
19#define _LOG4CXX_LOGGER_H
21#if defined(_MSC_VER) && (_MSC_VER < 1900)
22 #pragma warning ( push )
23 #pragma warning ( disable: 4127 )
26 #pragma warning ( push )
27 #pragma warning ( disable: 4231 4251 4275 4786 )
47class LoggerRepository;
107 helpers::AppenderAttachableImplPtr
aai;
193 void debug(
const std::string& msg)
const;
194#if LOG4CXX_WCHAR_T_API
221 void debug(
const std::wstring& msg)
const;
223#if LOG4CXX_UNICHAR_API
250 void debug(
const std::basic_string<UniChar>& msg)
const;
252#if LOG4CXX_CFSTRING_API
308 void error(
const std::string& msg)
const;
309#if LOG4CXX_WCHAR_T_API
322 void error(
const std::wstring& msg)
const;
338#if LOG4CXX_UNICHAR_API
365 void error(
const std::basic_string<UniChar>& msg)
const;
367#if LOG4CXX_CFSTRING_API
423 void fatal(
const std::string& msg)
const;
424#if LOG4CXX_WCHAR_T_API
451 void fatal(
const std::wstring& msg)
const;
453#if LOG4CXX_UNICHAR_API
480 void fatal(
const std::basic_string<UniChar>& msg)
const;
482#if LOG4CXX_CFSTRING_API
529#if LOG4CXX_WCHAR_T_API
547#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
565#if LOG4CXX_CFSTRING_API
642#if LOG4CXX_WCHAR_T_API
649#if LOG4CXX_UNICHAR_API
654 void getName(std::basic_string<UniChar>& name)
const;
656#if LOG4CXX_CFSTRING_API
690#if LOG4CXX_WCHAR_T_API
702#if LOG4CXX_UNICHAR_API
709#if LOG4CXX_CFSTRING_API
757#if LOG4CXX_WCHAR_T_API
774#if LOG4CXX_UNICHAR_API
791#if LOG4CXX_CFSTRING_API
847 void info(
const std::string& msg)
const;
848#if LOG4CXX_WCHAR_T_API
875 void info(
const std::wstring& msg)
const;
877#if LOG4CXX_UNICHAR_API
904 void info(
const std::basic_string<UniChar>& msg)
const;
906#if LOG4CXX_CFSTRING_API
1051 const std::vector<LogString>& values)
const;
1085 const std::string& val1)
const;
1104 const std::string& val1,
const std::string& val2)
const;
1124 const std::string& val1,
const std::string& val2,
const std::string& val3)
const;
1126#if LOG4CXX_WCHAR_T_API
1160 const std::wstring& val1)
const;
1179 const std::wstring& val1,
const std::wstring& val2)
const;
1199 const std::wstring& val1,
const std::wstring& val2,
const std::wstring& val3)
const;
1201#if LOG4CXX_UNICHAR_API
1235 const std::basic_string<UniChar>& val1)
const;
1254 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2)
const;
1274 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2,
1275 const std::basic_string<UniChar>& val3)
const;
1277#if LOG4CXX_CFSTRING_API
1371#if LOG4CXX_WCHAR_T_API
1390#if LOG4CXX_UNICHAR_API
1398 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message,
1407 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message)
const;
1409#if LOG4CXX_CFSTRING_API
1483 resourceBundle = bundle;
1486#if LOG4CXX_WCHAR_T_API
1513 void warn(
const std::wstring& msg)
const;
1515#if LOG4CXX_UNICHAR_API
1542 void warn(
const std::basic_string<UniChar>& msg)
const;
1544#if LOG4CXX_CFSTRING_API
1599 void warn(
const std::string& msg)
const;
1601#if LOG4CXX_WCHAR_T_API
1628 void trace(
const std::wstring& msg)
const;
1630#if LOG4CXX_UNICHAR_API
1657 void trace(
const std::basic_string<UniChar>& msg)
const;
1659#if LOG4CXX_CFSTRING_API
1714 void trace(
const std::string& msg)
const;
1722 void reconfigure(
const std::vector<AppenderPtr>& appenders,
bool additivity );
1729 mutable shared_mutex mutex;
1730 friend class log4cxx::helpers::synchronized;
1740#if !defined(LOG4CXX_UNLIKELY)
1748 #define LOG4CXX_UNLIKELY(expr) __builtin_expect(expr, 0)
1756 #define LOG4CXX_UNLIKELY(expr) expr
1768#define LOG4CXX_LOG(logger, level, message) do { \
1769 if (logger->isEnabledFor(level)) {\
1770 ::log4cxx::helpers::MessageBuffer oss_; \
1771 logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1780#define LOG4CXX_LOG_FMT(logger, level, ...) do { \
1781 if (logger->isEnabledFor(level)) {\
1782 logger->forcedLog(level, fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1791#define LOG4CXX_LOGLS(logger, level, message) do { \
1792 if (logger->isEnabledFor(level)) {\
1793 ::log4cxx::helpers::LogCharMessageBuffer oss_; \
1794 logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1796#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
1803#define LOG4CXX_DEBUG(logger, message) do { \
1804 if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
1805 ::log4cxx::helpers::MessageBuffer oss_; \
1806 logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1814#define LOG4CXX_DEBUG_FMT(logger, ...) do { \
1815 if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
1816 logger->forcedLog(::log4cxx::Level::getDebug(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1818#define LOG4CXX_DEBUG(logger, message)
1819#define LOG4CXX_DEBUG_FMT(logger, ...)
1822#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
1829#define LOG4CXX_TRACE(logger, message) do { \
1830 if (LOG4CXX_UNLIKELY(logger->isTraceEnabled())) {\
1831 ::log4cxx::helpers::MessageBuffer oss_; \
1832 logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1840#define LOG4CXX_TRACE_FMT(logger, ...) do { \
1841 if (LOG4CXX_UNLIKELY(logger->isTraceEnabled())) {\
1842 logger->forcedLog(::log4cxx::Level::getTrace(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1844#define LOG4CXX_TRACE(logger, message)
1845#define LOG4CXX_TRACE_FMT(logger, ...)
1848#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
1855#define LOG4CXX_INFO(logger, message) do { \
1856 if (logger->isInfoEnabled()) {\
1857 ::log4cxx::helpers::MessageBuffer oss_; \
1858 logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1867#define LOG4CXX_INFO_FMT(logger, ...) do { \
1868 if (logger->isInfoEnabled()) {\
1869 logger->forcedLog(::log4cxx::Level::getInfo(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1871#define LOG4CXX_INFO(logger, message)
1872#define LOG4CXX_INFO_FMT(logger, ...)
1875#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
1882#define LOG4CXX_WARN(logger, message) do { \
1883 if (logger->isWarnEnabled()) {\
1884 ::log4cxx::helpers::MessageBuffer oss_; \
1885 logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1893#define LOG4CXX_WARN_FMT(logger, ...) do { \
1894 if (logger->isWarnEnabled()) {\
1895 logger->forcedLog(::log4cxx::Level::getWarn(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1897#define LOG4CXX_WARN(logger, message)
1898#define LOG4CXX_WARN_FMT(logger, ...)
1901#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
1908#define LOG4CXX_ERROR(logger, message) do { \
1909 if (logger->isErrorEnabled()) {\
1910 ::log4cxx::helpers::MessageBuffer oss_; \
1911 logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1919#define LOG4CXX_ERROR_FMT(logger, ...) do { \
1920 if (logger->isErrorEnabled()) {\
1921 logger->forcedLog(::log4cxx::Level::getError(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1930#define LOG4CXX_ASSERT(logger, condition, message) do { \
1931 if (!(condition) && logger->isErrorEnabled()) {\
1932 ::log4cxx::helpers::MessageBuffer oss_; \
1933 logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1942#define LOG4CXX_ASSERT_FMT(logger, condition, ...) do { \
1943 if (!(condition) && logger->isErrorEnabled()) {\
1944 logger->forcedLog(::log4cxx::Level::getError(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1947#define LOG4CXX_ERROR(logger, message)
1948#define LOG4CXX_ERROR_FMT(logger, ...)
1949#define LOG4CXX_ASSERT(logger, condition, message)
1950#define LOG4CXX_ASSERT_FMT(logger, condition, ...)
1953#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
1960#define LOG4CXX_FATAL(logger, message) do { \
1961 if (logger->isFatalEnabled()) {\
1962 ::log4cxx::helpers::MessageBuffer oss_; \
1963 logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1971#define LOG4CXX_FATAL_FMT(logger, ...) do { \
1972 if (logger->isFatalEnabled()) {\
1973 logger->forcedLog(::log4cxx::Level::getFatal(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
1975#define LOG4CXX_FATAL(logger, message)
1976#define LOG4CXX_FATAL_FMT(logger, ...)
1986#define LOG4CXX_L7DLOG(logger, level, key) do { \
1987 if (logger->isEnabledFor(level)) {\
1988 logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
1998#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
1999 if (logger->isEnabledFor(level)) {\
2000 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
2011#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
2012 if (logger->isEnabledFor(level)) {\
2013 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
2025#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
2026 if (logger->isEnabledFor(level)) {\
2027 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }} while (0)
2031#if defined(_MSC_VER)
2032 #pragma warning ( pop )
Definition: defaultloggerfactory.h:32
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
Definition: hierarchy.h:63
This is the central class in the log4cxx package.
Definition: logger.h:66
void log(const LevelPtr &level, const std::wstring &message) const
This is the most generic printing method.
static LoggerPtr getLogger(const std::basic_string< UniChar > &name)
Retrieve a logger by name.
void info(const std::string &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the INFO level.
void setAdditivity(bool additive)
Set the additivity flag for this Logger instance.
virtual const LevelPtr & getEffectiveLevel() const
Starting from this logger, search the logger hierarchy for a non-null level and return it.
void info(const std::wstring &msg) const
Log a message string with the INFO level.
void l7dlog(const LevelPtr &level, const std::basic_string< UniChar > &key, const log4cxx::spi::LocationInfo &locationInfo, const std::basic_string< UniChar > &val1) const
Log a localized and parameterized message.
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 Logger...
void warn(const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the WARN level.
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
Log a localized and parameterized message.
void info(const std::basic_string< UniChar > &msg) const
Log a message string with the INFO level.
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 Logger...
void callAppenders(const log4cxx::spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) const
Call the appenders in the hierrachy starting at this.
void log(const LevelPtr &level, const std::basic_string< UniChar > &message, const log4cxx::spi::LocationInfo &location) const
This is the most generic printing method.
void error(const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
void warn(const std::basic_string< UniChar > &msg) const
Log a message string with the WARN level.
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 Logger...
void debug(const CFStringRef &msg) const
Log a message string with the DEBUG level.
static LoggerPtr getLoggerLS(const LogString &name)
Retrieve a logger by name in Unicode.
void setResourceBundle(const helpers::ResourceBundlePtr &bundle)
Set the resource bundle to be used with localized logging methods.
Definition: logger.h:1481
AppenderList getAllAppenders() const
Get the appenders contained in this logger as an AppenderList.
AppenderPtr getAppender(const LogString &name) const
Look for the appender named as name.
void warn(const std::string &msg) const
Log a message string with the WARN level.
void error(const std::wstring &msg) const
Log a message string with the ERROR level.
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
Log a localized and parameterized message.
void trace(const std::string &msg) const
Log a message string with the TRACE level.
static LoggerPtr getLogger(const std::wstring &name)
Retrieve a logger by name.
helpers::ResourceBundlePtr getResourceBundle() const
Return the inherited ResourceBundle for this logger.
void fatal(const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
void l7dlog(const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo, const std::wstring &val1) const
Log a localized and parameterized message.
void logLS(const LevelPtr &level, const LogString &message, const log4cxx::spi::LocationInfo &location) const
This is the most generic printing method.
static LoggerPtr getLogger(const char *const name)
Retrieve a logger by name in current encoding.
void l7dlog(const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo, const std::string &val1) const
Log a localized and parameterized message.
bool isInfoEnabled() const
Check whether this logger is enabled for the info Level.
void trace(const std::string &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the TRACE level.
void removeAppender(const LogString &name)
Remove the appender with the name passed as parameter form the list of appenders.
log4cxx::spi::LoggerRepository * getLoggerRepository() const
Return the the LoggerRepository where this Logger is attached.
bool isFatalEnabled() const
Check whether this logger is enabled for the fatal Level.
void debug(const std::basic_string< UniChar > &msg) const
Log a message string with the DEBUG level.
void warn(const CFStringRef &msg) const
Log a message string with the WARN level.
void log(const LevelPtr &level, const CFStringRef &message) const
This is the most generic printing method.
virtual void setLevel(const LevelPtr level)
Set the level of this Logger.
void getName(std::wstring &name) const
Get logger name.
bool isWarnEnabled() const
Check whether this logger is enabled for the warn Level.
log4cxx::spi::LoggerRepository * repository
Definition: logger.h:105
void debug(const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the DEBUG level.
void fatal(const CFStringRef &msg) const
Log a message string with the ERROR level.
void log(const LevelPtr &level, const std::basic_string< UniChar > &message) const
This is the most generic printing method.
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
Log a localized and parameterized message.
void log(const LevelPtr &level, const std::string &message) const
This is the most generic printing method.
void trace(const std::basic_string< UniChar > &msg) const
Log a message string with the TRACE level.
bool additive
Additivity is set to true by default, that is children inherit the appenders of their ancestors by de...
Definition: logger.h:116
void l7dlog(const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo) const
Log a localized and parameterized message.
void trace(const std::wstring &msg) const
Log a message string with the TRACE level.
void error(const std::string &msg) const
Log a message string with the ERROR level.
void l7dlog(const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1, const CFStringRef &val2) const
Log a localized and parameterized message.
void fatal(const std::wstring &msg) const
Log a message string with the ERROR level.
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 Logger...
const LogString & getName() const
Get the logger name.
Definition: logger.h:633
LogString getResourceBundleString(const LogString &key) const
Returns the string resource coresponding to key in this logger's inherited resource bundle.
bool isEnabledFor(const LevelPtr &level) const
Check whether this logger is enabled for a given Level passed as parameter.
static LoggerPtr getLogger(const wchar_t *const name)
Retrieve a logger by name.
void debug(const std::string &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the DEBUG level.
void debug(const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the DEBUG level.
void info(const std::string &msg) const
bool isAttached(const AppenderPtr appender) const
Is the appender passed as parameter attached to this logger?
void forcedLog(const LevelPtr &level, const std::basic_string< UniChar > &message, const log4cxx::spi::LocationInfo &location) const
This method creates a new logging event and logs the event without further checks.
void forcedLog(const LevelPtr &level, const std::basic_string< UniChar > &message) const
This method creates a new logging event and logs the event without further checks.
void error(const CFStringRef &msg) const
Log a message string with the ERROR level.
helpers::AppenderAttachableImplPtr aai
Definition: logger.h:107
void error(const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
void warn(const std::string &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the WARN level.
void removeAllAppenders()
Remove all previously added appenders from this logger instance.
void warn(const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the WARN level.
void forcedLog(const LevelPtr &level, const CFStringRef &message, const log4cxx::spi::LocationInfo &location) const
This method creates a new logging event and logs the event without further checks.
void forcedLog(const LevelPtr &level, const CFStringRef &message) const
This method creates a new logging event and logs the event without further checks.
void fatal(const std::string &msg) const
Log a message string with the ERROR level.
void log(const LevelPtr &level, const std::wstring &message, const log4cxx::spi::LocationInfo &location) const
This is the most generic printing method.
void warn(const std::wstring &msg) const
Log a message string with the WARN level.
void setHierarchy(spi::LoggerRepository *repository)
Only the Hierarchy class can set the hierarchy of a logger.
void debug(const std::wstring &msg) const
Log a message string with the DEBUG level.
void l7dlog(const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo) const
Log a localized and parameterized message.
void trace(const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the TRACE level.
void l7dlog(const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo, const std::string &val1, const std::string &val2) const
Log a localized and parameterized message.
LoggerPtr parent
The parent of this logger.
Definition: logger.h:95
static LoggerPtr getLogger(const CFStringRef &name)
Retrieve a logger by name.
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 Logger...
void error(const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
virtual void addAppender(const AppenderPtr newAppender)
Add newAppender to the list of appenders of this Logger instance.
void forcedLogLS(const LevelPtr &level, const LogString &message, const log4cxx::spi::LocationInfo &location) const
This method creates a new logging event and logs the event without further checks.
void error(const std::basic_string< UniChar > &msg) const
Log a message string with the ERROR level.
void fatal(const std::basic_string< UniChar > &msg) const
Log a message string with the ERROR level.
static LoggerPtr getLogger(const std::string &name)
Retrieve a logger by name in current encoding.
bool isDebugEnabled() const
Check whether this logger is enabled for the DEBUG Level.
void error(const std::string &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
void forcedLog(const LevelPtr &level, const std::wstring &message, const log4cxx::spi::LocationInfo &location) const
This method creates a new logging event and logs the event without further checks.
void info(const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the INFO level.
void getName(std::string &name) const
Get logger name in current encoding.
void forcedLog(const LevelPtr &level, const std::wstring &message) const
This method creates a new logging event and logs the event without further checks.
void l7dlog(const LevelPtr &level, const std::basic_string< UniChar > &key, const log4cxx::spi::LocationInfo &locationInfo) const
Log a localized and parameterized message.
void fatal(const std::string &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the FATAL level.
void log(const LevelPtr &level, const std::string &message, const log4cxx::spi::LocationInfo &location) const
This is the most generic printing method.
void fatal(const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
void fatal(const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the ERROR level.
bool getAdditivity() const
Get the additivity flag for this Logger instance.
void getName(CFStringRef &name) const
Get logger name.
static LoggerPtr getRootLogger()
Retrieve the root logger.
void trace(const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the TRACE level.
helpers::ResourceBundlePtr resourceBundle
The resourceBundle for localized messages.
Definition: logger.h:101
void log(const LevelPtr &level, const CFStringRef &message, const log4cxx::spi::LocationInfo &location) const
This is the most generic printing method.
LevelPtr level
The assigned level of this logger.
Definition: logger.h:90
void warn(const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the WARN level.
void trace(const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the TRACE level.
LoggerPtr getParent() const
Returns the parent of this logger.
void l7dlog(const LevelPtr &level, const std::wstring &key, const log4cxx::spi::LocationInfo &locationInfo, const std::wstring &val1, const std::wstring &val2) const
Log a localized and parameterized message.
void l7dlog(const LevelPtr &level, const LogString &key, const log4cxx::spi::LocationInfo &locationInfo, const std::vector< LogString > &values) const
Log a localized and parameterized message.
void forcedLog(const LevelPtr &level, const std::string &message, const log4cxx::spi::LocationInfo &location) const
This method creates a new logging event and logs the event without further checks.
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
Log a localized and parameterized message.
void l7dlog(const LevelPtr &level, const std::string &key, const log4cxx::spi::LocationInfo &locationInfo) const
Log a localized and parameterized message.
void closeNestedAppenders()
Close all attached appenders implementing the AppenderAttachable interface.
void info(const CFStringRef &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the INFO level.
void info(const std::basic_string< UniChar > &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the INFO level.
Logger(log4cxx::helpers::Pool &pool, const LogString &name)
This constructor created a new logger instance and sets its name.
void info(const CFStringRef &msg) const
Log a message string with the INFO level.
void debug(const std::wstring &msg, const log4cxx::spi::LocationInfo &location) const
Log a message string with the DEBUG level.
void l7dlog(const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1, const CFStringRef &val2, const CFStringRef &val3) const
Log a localized and parameterized message.
LevelPtr getLevel() const
Returns the assigned Level, if any, for this Logger.
void getName(std::basic_string< UniChar > &name) const
Get logger name.
void removeAppender(const AppenderPtr appender)
Remove the appender passed as parameter form the list of appenders.
LogString name
The name of this logger.
Definition: logger.h:84
void trace(const CFStringRef &msg) const
Log a message string with the TRACE level.
void l7dlog(const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1) const
Log a localized and parameterized message.
void debug(const std::string &msg) const
Log a message string with the DEBUG level.
void reconfigure(const std::vector< AppenderPtr > &appenders, bool additivity)
Reconfigure this logger by configuring all of the appenders.
bool isErrorEnabled() const
Check whether this logger is enabled for the error Level.
void forcedLog(const LevelPtr &level, const std::string &message) const
This method creates a new logging event and logs the event without further checks.
bool isTraceEnabled() const
Check whether this logger is enabled for the trace level.
base class for java-like objects.
Definition: object.h:102
This Interface is for attaching Appenders to objects.
Definition: appenderattachable.h:39
This class represents the location of a logging statement.
Definition: locationinfo.h:47
Implement this interface to create new instances of Logger or a sub-class of Logger.
Definition: loggerfactory.h:33
A LoggerRepository is used to create and retrieve Loggers.
Definition: loggerrepository.h:48
const struct __CFString * CFStringRef
Definition: logstring.h:36
std::shared_ptr< LoggerFactory > LoggerFactoryPtr
Definition: logmanager.h:39
LOG4CXX_PTR_DEF(LoggerRepository)
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:38
Definition: messagehandler.h:23
LOG4CXX_LIST_DEF(AppenderList, AppenderPtr)
std::basic_string< logchar > LogString
Definition: logstring.h:66
std::shared_ptr< Level > LevelPtr
Definition: optionconverter.h:28
LOG4CXX_PTR_DEF(Appender)
std::shared_ptr< Appender > AppenderPtr
Definition: basicconfigurator.h:29
std::shared_ptr< Logger > LoggerPtr
Definition: defaultloggerfactory.h:27
std::vector< LoggerPtr > LoggerList
Definition: logmanager.h:34
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:153
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:26
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:147
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:141