18#ifndef _LOG4CXX_LOGGER_H
19#define _LOG4CXX_LOGGER_H
33class LoggerRepository;
60 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(LoggerPrivate, m_priv)
136 void debug(
const std::string& msg)
const;
137#if LOG4CXX_WCHAR_T_API
168 void debug(
const std::wstring& msg)
const;
170#if LOG4CXX_UNICHAR_API
201 void debug(
const std::basic_string<UniChar>& msg)
const;
203#if LOG4CXX_CFSTRING_API
267 void error(
const std::string& msg)
const;
268#if LOG4CXX_WCHAR_T_API
283 void error(
const std::wstring& msg)
const;
301#if LOG4CXX_UNICHAR_API
332 void error(
const std::basic_string<UniChar>& msg)
const;
334#if LOG4CXX_CFSTRING_API
398 void fatal(
const std::string& msg)
const;
399#if LOG4CXX_WCHAR_T_API
430 void fatal(
const std::wstring& msg)
const;
432#if LOG4CXX_UNICHAR_API
463 void fatal(
const std::basic_string<UniChar>& msg)
const;
465#if LOG4CXX_CFSTRING_API
516#if LOG4CXX_WCHAR_T_API
534#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
552#if LOG4CXX_CFSTRING_API
627#if LOG4CXX_WCHAR_T_API
634#if LOG4CXX_UNICHAR_API
639 void getName(std::basic_string<UniChar>& name)
const;
641#if LOG4CXX_CFSTRING_API
675#if LOG4CXX_WCHAR_T_API
687#if LOG4CXX_UNICHAR_API
694#if LOG4CXX_CFSTRING_API
742#if LOG4CXX_WCHAR_T_API
759#if LOG4CXX_UNICHAR_API
776#if LOG4CXX_CFSTRING_API
848 void info(
const std::string& msg)
const;
849#if LOG4CXX_WCHAR_T_API
880 void info(
const std::wstring& msg)
const;
882#if LOG4CXX_UNICHAR_API
911 void info(
const std::basic_string<UniChar>& msg)
const;
913#if LOG4CXX_CFSTRING_API
1011 return logger && logger->m_threshold <= Level::DEBUG_INT && logger->isDebugEnabled();
1045 return logger && logger->m_threshold <= Level::INFO_INT && logger->isInfoEnabled();
1071 return logger && logger->m_threshold <= Level::WARN_INT && logger->isWarnEnabled();
1097 return logger && logger->m_threshold <= Level::ERROR_INT && logger->isErrorEnabled();
1123 return logger && logger->m_threshold <= Level::FATAL_INT && logger->isFatalEnabled();
1149 return logger && logger->m_threshold <= Level::TRACE_INT && logger->isTraceEnabled();
1172 const std::vector<LogString>& values)
const;
1209 const std::string& val)
const;
1230 const std::string& val1,
const std::string& val2)
const;
1252 const std::string& val1,
const std::string& val2,
const std::string& val3)
const;
1254#if LOG4CXX_WCHAR_T_API
1291 const std::wstring& val)
const;
1312 const std::wstring& val1,
const std::wstring& val2)
const;
1334 const std::wstring& val1,
const std::wstring& val2,
const std::wstring& val3)
const;
1336#if LOG4CXX_UNICHAR_API
1373 const std::basic_string<UniChar>& val)
const;
1394 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2)
const;
1416 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2,
1417 const std::basic_string<UniChar>& val3)
const;
1419#if LOG4CXX_CFSTRING_API
1522#if LOG4CXX_WCHAR_T_API
1543#if LOG4CXX_UNICHAR_API
1552 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message,
1562 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message)
const;
1564#if LOG4CXX_CFSTRING_API
1657#if LOG4CXX_WCHAR_T_API
1688 void warn(
const std::wstring& msg)
const;
1690#if LOG4CXX_UNICHAR_API
1721 void warn(
const std::basic_string<UniChar>& msg)
const;
1723#if LOG4CXX_CFSTRING_API
1786 void warn(
const std::string& msg)
const;
1788#if LOG4CXX_WCHAR_T_API
1819 void trace(
const std::wstring& msg)
const;
1821#if LOG4CXX_UNICHAR_API
1852 void trace(
const std::basic_string<UniChar>& msg)
const;
1854#if LOG4CXX_CFSTRING_API
1917 void trace(
const std::string& msg)
const;
1925 void reconfigure(
const std::vector<AppenderPtr>& appenders,
bool additivity );
1940#if !defined(LOG4CXX_UNLIKELY)
1948 #define LOG4CXX_UNLIKELY(expr) __builtin_expect(expr, 0)
1956 #define LOG4CXX_UNLIKELY(expr) expr
1960#if defined(LOG4CXX_ENABLE_STACKTRACE) && !defined(LOG4CXX_STACKTRACE)
1961 #ifndef __has_include
1962 #include <boost/stacktrace.hpp>
1963 #define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
1964 #elif __has_include(<stacktrace>)
1965 #include <stacktrace>
1966 #define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL + std::stacktrace::to_string(std::stacktrace::stacktrace()));
1967 #elif __has_include(<boost/stacktrace.hpp>)
1968 #include <boost/stacktrace.hpp>
1969 #define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
1971 #warning "Stacktrace requested but no implementation found"
1975#if !defined(LOG4CXX_STACKTRACE)
1976#define LOG4CXX_STACKTRACE
1987#define LOG4CXX_LOG(logger, level, message) do { \
1988 if (logger->isEnabledFor(level)) {\
1989 ::log4cxx::helpers::MessageBuffer oss_; \
1990 logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1999#define LOG4CXX_LOG_FMT(logger, level, ...) do { \
2000 if (logger->isEnabledFor(level)) {\
2001 logger->forcedLog(level, fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2010#define LOG4CXX_LOGLS(logger, level, message) do { \
2011 if (logger->isEnabledFor(level)) {\
2012 ::log4cxx::helpers::LogCharMessageBuffer oss_; \
2013 logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2015#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
2034#define LOG4CXX_DEBUG(logger, message) do { \
2035 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isDebugEnabledFor(logger))) {\
2036 ::log4cxx::helpers::MessageBuffer oss_; \
2037 logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2045#define LOG4CXX_DEBUG_FMT(logger, ...) do { \
2046 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isDebugEnabledFor(logger))) {\
2047 logger->forcedLog(::log4cxx::Level::getDebug(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2049#define LOG4CXX_DEBUG(logger, message)
2050#define LOG4CXX_DEBUG_FMT(logger, ...)
2053#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
2066#define LOG4CXX_TRACE(logger, message) do { \
2067 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isTraceEnabledFor(logger))) {\
2068 ::log4cxx::helpers::MessageBuffer oss_; \
2069 logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2077#define LOG4CXX_TRACE_FMT(logger, ...) do { \
2078 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isTraceEnabledFor(logger))) {\
2079 logger->forcedLog(::log4cxx::Level::getTrace(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2081#define LOG4CXX_TRACE(logger, message)
2082#define LOG4CXX_TRACE_FMT(logger, ...)
2085#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
2102#define LOG4CXX_INFO(logger, message) do { \
2103 if (::log4cxx::Logger::isInfoEnabledFor(logger)) {\
2104 ::log4cxx::helpers::MessageBuffer oss_; \
2105 logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2113#define LOG4CXX_INFO_FMT(logger, ...) do { \
2114 if (::log4cxx::Logger::isInfoEnabledFor(logger)) {\
2115 logger->forcedLog(::log4cxx::Level::getInfo(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2117#define LOG4CXX_INFO(logger, message)
2118#define LOG4CXX_INFO_FMT(logger, ...)
2121#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
2136#define LOG4CXX_WARN(logger, message) do { \
2137 if (::log4cxx::Logger::isWarnEnabledFor(logger)) {\
2138 ::log4cxx::helpers::MessageBuffer oss_; \
2139 logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2147#define LOG4CXX_WARN_FMT(logger, ...) do { \
2148 if (::log4cxx::Logger::isWarnEnabledFor(logger)) {\
2149 logger->forcedLog(::log4cxx::Level::getWarn(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2151#define LOG4CXX_WARN(logger, message)
2152#define LOG4CXX_WARN_FMT(logger, ...)
2155#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
2170#define LOG4CXX_ERROR(logger, message) do { \
2171 if (::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2172 ::log4cxx::helpers::MessageBuffer oss_; \
2173 logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2181#define LOG4CXX_ERROR_FMT(logger, ...) do { \
2182 if (::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2183 logger->forcedLog(::log4cxx::Level::getError(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2192#define LOG4CXX_ASSERT(logger, condition, message) do { \
2193 if (!(condition) && ::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2194 ::log4cxx::helpers::MessageBuffer oss_; \
2195 LOG4CXX_STACKTRACE \
2196 logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2205#define LOG4CXX_ASSERT_FMT(logger, condition, ...) do { \
2206 if (!(condition) && ::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2207 LOG4CXX_STACKTRACE \
2208 logger->forcedLog(::log4cxx::Level::getError(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2211#define LOG4CXX_ERROR(logger, message)
2212#define LOG4CXX_ERROR_FMT(logger, ...)
2213#define LOG4CXX_ASSERT(logger, condition, message)
2214#define LOG4CXX_ASSERT_FMT(logger, condition, ...)
2217#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
2229#define LOG4CXX_FATAL(logger, message) do { \
2230 if (::log4cxx::Logger::isFatalEnabledFor(logger)) {\
2231 ::log4cxx::helpers::MessageBuffer oss_; \
2232 logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2240#define LOG4CXX_FATAL_FMT(logger, ...) do { \
2241 if (::log4cxx::Logger::isFatalEnabledFor(logger)) {\
2242 logger->forcedLog(::log4cxx::Level::getFatal(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2244#define LOG4CXX_FATAL(logger, message)
2245#define LOG4CXX_FATAL_FMT(logger, ...)
2255#define LOG4CXX_L7DLOG(logger, level, key) do { \
2256 if (logger->isEnabledFor(level)) {\
2257 logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
2267#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
2268 if (logger->isEnabledFor(level)) {\
2269 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
2280#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
2281 if (logger->isEnabledFor(level)) {\
2282 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
2294#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
2295 if (logger->isEnabledFor(level)) {\
2296 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }} while (0)
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
Definition: hierarchy.h:56
This is the central class in the log4cxx package.
Definition: logger.h:51
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...
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
Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO eve...
void setAdditivity(bool additive)
Set the additivity flag for this logger.
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
Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO eve...
void removeAllAppenders() override
Remove all previously added appenders from this logger instance.
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
Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN eve...
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,...
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 eve...
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 setParent(LoggerPtr parentLogger)
Only the Hierarchy class can set the parent of a logger.
static bool isErrorEnabledFor(const LoggerPtr &logger)
Is logger is enabled for ERROR level logging events?
Definition: logger.h:1095
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
Add a new logging event containing message and location to the appenders attached to this logger if t...
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...
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 eve...
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
Add a new logging event containing msg to attached appender(s) if this logger is enabled for DEBUG ev...
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.
AppenderList getAllAppenders() const override
Get the appenders contained in this logger as an AppenderList.
Logger(helpers::Pool &pool, const LogString &name)
This constructor initializes a new logger instance and sets its name.
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 eve...
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 ev...
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,...
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 ev...
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
Add a new logging event containing msg and location to attached appender(s) if this logger is enabled...
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 t...
static LoggerPtr getLogger(const char *const name)
Retrieve a logger by name in current encoding.
bool isInfoEnabled() const
Is this logger is enabled for INFO level logging 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 ev...
log4cxx::spi::LoggerRepository * getLoggerRepository() const
Return the the LoggerRepository where this Logger is attached.
bool isAttached(const AppenderPtr appender) const override
Is appender attached to this logger?
bool isFatalEnabled() const
Is this logger is enabled for FATAL level logging 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 ev...
void warn(const CFStringRef &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for WARN eve...
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...
virtual void setLevel(const LevelPtr level)
Set the level of this logger.
void getName(std::wstring &name) const
Put name of this logger into name.
bool isWarnEnabled() const
Is this logger is enabled for WARN level logging 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 ...
void removeAppender(const LogString &name) override
Remove the appender with the name passed as parameter form the list of appenders.
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...
void fatal(const CFStringRef &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR ev...
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...
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 a...
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...
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 ev...
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)...
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 ev...
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 ev...
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 a...
void fatal(const std::wstring &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR ev...
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.
LogString getResourceBundleString(const LogString &key) const
Returns the string resource corresponding to key in this logger's inherited resource bundle.
bool isEnabledFor(const LevelPtr &level) const
Is this logger is enabled for logging events at level?
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
Add a new logging event containing msg and location to attached appender(s) if this logger is enabled...
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...
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 eve...
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).
void forcedLog(const LevelPtr &level, const std::basic_string< UniChar > &message) const
Add a new logging event containing message to attached appender(s).
static bool isWarnEnabledFor(const LoggerPtr &logger)
Is logger is enabled for WARN level logging events?
Definition: logger.h:1069
void error(const CFStringRef &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR ev...
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...
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 eve...
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 ...
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 eve...
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).
void forcedLog(const LevelPtr &level, const CFStringRef &message) const
Add a new logging event containing message to attached appender(s).
void fatal(const std::string &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR ev...
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 t...
static bool isDebugEnabledFor(const LoggerPtr &logger)
Is logger is enabled for DEBUG level logging events?
Definition: logger.h:1009
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 eve...
AppenderPtr getAppender(const LogString &name) const override
Look for the appender named as name.
void setHierarchy(spi::LoggerRepository *repository)
Only the Hierarchy class can set the hierarchy of a logger.
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 ev...
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)...
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 ev...
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 a...
static bool isFatalEnabledFor(const LoggerPtr &logger)
Is logger is enabled for FATAL level logging events?
Definition: logger.h:1121
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
Add a new logging event containing msg and location to attached appender(s) if this logger is enabled...
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).
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 ev...
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 ...
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 ERROR ev...
static bool isInfoEnabledFor(const LoggerPtr &logger)
Is logger is enabled for INFO level logging events?
Definition: logger.h:1043
static LoggerPtr getLogger(const std::string &name)
Retrieve a logger by name in current encoding.
bool isDebugEnabled() const
Is this logger is enabled for DEBUG level logging events?
const LevelPtr & getLevel() const
The assigned Level, if any, for this logger.
void removeHierarchy()
Only the Hierarchy class can remove the hierarchy of a logger.
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...
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).
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 eve...
void getName(std::string &name) const
Put name of this logger into name in current encoding.
void forcedLog(const LevelPtr &level, const std::wstring &message) const
Add a new logging event containing message to attached appender(s).
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)...
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...
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 t...
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...
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...
bool getAdditivity() const
Get the additivity flag for this logger.
void getName(CFStringRef &name) const
Put name of this logger into name.
static LoggerPtr getRootLogger()
Retrieve the root logger.
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 ev...
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 t...
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 eve...
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 ev...
LoggerPtr getParent() const
The parent of this logger.
void updateThreshold()
Only the Hierarchy class can change the threshold of a logger.
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 a...
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 parame...
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).
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,...
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)...
void closeNestedAppenders()
Close all attached appenders implementing the AppenderAttachable interface.
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 eve...
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 eve...
void info(const CFStringRef &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for INFO eve...
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...
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,...
void getName(std::basic_string< UniChar > &name) const
Put name of this logger into name.
void trace(const CFStringRef &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE ev...
void removeAppender(const AppenderPtr appender) override
Remove the appender passed as parameter form the list of appenders.
static bool isTraceEnabledFor(const LoggerPtr &logger)
Is logger is enabled for TRACE level logging events?
Definition: logger.h:1147
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 ...
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 ev...
void reconfigure(const std::vector< AppenderPtr > &appenders, bool additivity)
Reconfigure this logger by configuring all of the appenders.
bool isErrorEnabled() const
Is this logger is enabled for ERROR level logging events?
void addAppender(const AppenderPtr newAppender) override
Add newAppender to the list of appenders of this Logger instance.
void forcedLog(const LevelPtr &level, const std::string &message) const
Add a new logging event containing message to attached appender(s).
bool isTraceEnabled() const
Is this logger is enabled for TRACE level logging events?
This Interface is for attaching Appenders to objects.
Definition: appenderattachable.h:34
This class represents the location of a logging statement.
Definition: locationinfo.h:46
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:43
const struct __CFString * CFStringRef
Definition: logstring.h:30
LOG4CXX_PTR_DEF(LoggerRepository)
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:32
std::shared_ptr< LoggerFactory > LoggerFactoryPtr
Definition: logmanager.h:34
Definition: configuration.h:25
LOG4CXX_LIST_DEF(AppenderList, AppenderPtr)
std::basic_string< logchar > LogString
Definition: logstring.h:60
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:29
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:157
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:38
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:151
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:145