18#ifndef _LOG4CXX_LOGGER_H
19#define _LOG4CXX_LOGGER_H
33class LoggerRepository;
50 public virtual LOG4CXX_NS::spi::AppenderAttachable
60 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(LoggerPrivate, m_priv)
100 void callAppenders(
const LOG4CXX_NS::spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& p)
const;
121 void debug(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
136 void debug(
const std::string& msg)
const;
137#if LOG4CXX_WCHAR_T_API
153 void debug(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
168 void debug(
const std::wstring& msg)
const;
170#if LOG4CXX_UNICHAR_API
186 void debug(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
201 void debug(
const std::basic_string<UniChar>& msg)
const;
203#if LOG4CXX_CFSTRING_API
252 void error(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
267 void error(
const std::string& msg)
const;
268#if LOG4CXX_WCHAR_T_API
283 void error(
const std::wstring& msg)
const;
299 void error(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
301#if LOG4CXX_UNICHAR_API
317 void error(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
332 void error(
const std::basic_string<UniChar>& msg)
const;
334#if LOG4CXX_CFSTRING_API
383 void fatal(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
398 void fatal(
const std::string& msg)
const;
399#if LOG4CXX_WCHAR_T_API
415 void fatal(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
430 void fatal(
const std::wstring& msg)
const;
432#if LOG4CXX_UNICHAR_API
448 void fatal(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
463 void fatal(
const std::basic_string<UniChar>& msg)
const;
465#if LOG4CXX_CFSTRING_API
507 ,
const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
517 const LOG4CXX_NS::spi::LocationInfo& location)
const;
526#if LOG4CXX_WCHAR_T_API
535 ,
const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
545 const LOG4CXX_NS::spi::LocationInfo& location)
const;
554#if LOG4CXX_UNICHAR_API
563 const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
572 const LOG4CXX_NS::spi::LocationInfo& location)
const;
581#if LOG4CXX_CFSTRING_API
590 const LOG4CXX_NS::spi::LocationInfo& location)
const;
607 ,
const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
617 const LOG4CXX_NS::spi::LocationInfo& location)
const;
666#if LOG4CXX_WCHAR_T_API
673#if LOG4CXX_UNICHAR_API
678 void getName(std::basic_string<UniChar>& name)
const;
680#if LOG4CXX_CFSTRING_API
714#if LOG4CXX_WCHAR_T_API
726#if LOG4CXX_UNICHAR_API
733#if LOG4CXX_CFSTRING_API
765 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
780 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
781#if LOG4CXX_WCHAR_T_API
796 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
798#if LOG4CXX_UNICHAR_API
813 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
815#if LOG4CXX_CFSTRING_API
830 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
872 void info(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
887 void info(
const std::string& msg)
const;
888#if LOG4CXX_WCHAR_T_API
904 void info(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
919 void info(
const std::wstring& msg)
const;
921#if LOG4CXX_UNICHAR_API
935 void info(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
950 void info(
const std::basic_string<UniChar>& msg)
const;
952#if LOG4CXX_CFSTRING_API
968 void info(
const CFStringRef& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1050 return logger && logger->m_threshold <= Level::DEBUG_INT && logger->isDebugEnabled();
1084 return logger && logger->m_threshold <= Level::INFO_INT && logger->isInfoEnabled();
1110 return logger && logger->m_threshold <= Level::WARN_INT && logger->isWarnEnabled();
1136 return logger && logger->m_threshold <= Level::ERROR_INT && logger->isErrorEnabled();
1162 return logger && logger->m_threshold <= Level::FATAL_INT && logger->isFatalEnabled();
1188 return logger && logger->m_threshold <= Level::TRACE_INT && logger->isTraceEnabled();
1210 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1211 const std::vector<LogString>& values)
const;
1228 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1247 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1248 const std::string& val)
const;
1268 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1269 const std::string& val1,
const std::string& val2)
const;
1290 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1291 const std::string& val1,
const std::string& val2,
const std::string& val3)
const;
1293#if LOG4CXX_WCHAR_T_API
1310 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1329 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1330 const std::wstring& val)
const;
1350 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1351 const std::wstring& val1,
const std::wstring& val2)
const;
1372 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1373 const std::wstring& val1,
const std::wstring& val2,
const std::wstring& val3)
const;
1375#if LOG4CXX_UNICHAR_API
1392 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1411 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1412 const std::basic_string<UniChar>& val)
const;
1432 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1433 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2)
const;
1454 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1455 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2,
1456 const std::basic_string<UniChar>& val3)
const;
1458#if LOG4CXX_CFSTRING_API
1475 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1494 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1515 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1537 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1551 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1561#if LOG4CXX_WCHAR_T_API
1571 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1582#if LOG4CXX_UNICHAR_API
1591 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message,
1592 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1601 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message)
const;
1603#if LOG4CXX_CFSTRING_API
1613 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1633 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1696#if LOG4CXX_WCHAR_T_API
1712 void warn(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1727 void warn(
const std::wstring& msg)
const;
1729#if LOG4CXX_UNICHAR_API
1745 void warn(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1760 void warn(
const std::basic_string<UniChar>& msg)
const;
1762#if LOG4CXX_CFSTRING_API
1810 void warn(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1825 void warn(
const std::string& msg)
const;
1827#if LOG4CXX_WCHAR_T_API
1843 void trace(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1858 void trace(
const std::wstring& msg)
const;
1860#if LOG4CXX_UNICHAR_API
1876 void trace(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1891 void trace(
const std::basic_string<UniChar>& msg)
const;
1893#if LOG4CXX_CFSTRING_API
1941 void trace(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1956 void trace(
const std::string& msg)
const;
1964 void reconfigure(
const std::vector<AppenderPtr>& appenders,
bool additivity );
1979#if !defined(LOG4CXX_UNLIKELY)
1987 #define LOG4CXX_UNLIKELY(expr) __builtin_expect(expr, 0)
1995 #define LOG4CXX_UNLIKELY(expr) expr
1999#if defined(LOG4CXX_ENABLE_STACKTRACE) && !defined(LOG4CXX_STACKTRACE)
2000 #ifndef __has_include
2001 #include <boost/stacktrace.hpp>
2002 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
2003 #elif __has_include(<stacktrace>)
2004 #include <stacktrace>
2005 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + std::stacktrace::to_string(std::stacktrace::stacktrace()));
2006 #elif __has_include(<boost/stacktrace.hpp>)
2007 #include <boost/stacktrace.hpp>
2008 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
2010 #warning "Stacktrace requested but no implementation found"
2014#if !defined(LOG4CXX_STACKTRACE)
2015#define LOG4CXX_STACKTRACE
2026#define LOG4CXX_LOG(logger, level, message) do { \
2027 if (logger->isEnabledFor(level)) {\
2028 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2029 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2039#define LOG4CXX_LOG_FMT(logger, level, fmt, ...) do { \
2040 if (logger->isEnabledFor(level)) {\
2041 logger->addEvent(level, ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2050#define LOG4CXX_LOGLS(logger, level, message) do { \
2051 if (logger->isEnabledFor(level)) {\
2052 ::LOG4CXX_NS::helpers::LogCharMessageBuffer oss_; \
2053 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2055#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
2075#define LOG4CXX_DEBUG(logger, message) do { \
2076 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isDebugEnabledFor(logger))) {\
2077 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2078 logger->addEvent(::LOG4CXX_NS::Level::getDebug(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2099#define LOG4CXX_DEBUG_FMT(logger, fmt, ...) do { \
2100 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isDebugEnabledFor(logger))) {\
2101 logger->addEvent(::LOG4CXX_NS::Level::getDebug(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2103#define LOG4CXX_DEBUG(logger, message)
2104#define LOG4CXX_DEBUG_FMT(logger, fmt, ...)
2107#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
2119#define LOG4CXX_TRACE(logger, message) do { \
2120 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isTraceEnabledFor(logger))) {\
2121 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2122 logger->addEvent(::LOG4CXX_NS::Level::getTrace(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2136#define LOG4CXX_TRACE_FMT(logger, fmt, ...) do { \
2137 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isTraceEnabledFor(logger))) {\
2138 logger->addEvent(::LOG4CXX_NS::Level::getTrace(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2140#define LOG4CXX_TRACE(logger, message)
2141#define LOG4CXX_TRACE_FMT(logger, fmt, ...)
2144#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
2161#define LOG4CXX_INFO(logger, message) do { \
2162 if (::LOG4CXX_NS::Logger::isInfoEnabledFor(logger)) {\
2163 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2164 logger->addEvent(::LOG4CXX_NS::Level::getInfo(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2182#define LOG4CXX_INFO_FMT(logger, fmt, ...) do { \
2183 if (::LOG4CXX_NS::Logger::isInfoEnabledFor(logger)) {\
2184 logger->addEvent(::LOG4CXX_NS::Level::getInfo(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2186#define LOG4CXX_INFO(logger, message)
2187#define LOG4CXX_INFO_FMT(logger, fmt, ...)
2190#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
2205#define LOG4CXX_WARN(logger, message) do { \
2206 if (::LOG4CXX_NS::Logger::isWarnEnabledFor(logger)) {\
2207 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2208 logger->addEvent(::LOG4CXX_NS::Level::getWarn(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2225#define LOG4CXX_WARN_FMT(logger, fmt, ...) do { \
2226 if (::LOG4CXX_NS::Logger::isWarnEnabledFor(logger)) {\
2227 logger->addEvent(::LOG4CXX_NS::Level::getWarn(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2229#define LOG4CXX_WARN(logger, message)
2230#define LOG4CXX_WARN_FMT(logger, fmt, ...)
2233#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
2248#define LOG4CXX_ERROR(logger, message) do { \
2249 if (::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2250 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2251 logger->addEvent(::LOG4CXX_NS::Level::getError(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2268#define LOG4CXX_ERROR_FMT(logger, fmt, ...) do { \
2269 if (::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2270 logger->addEvent(::LOG4CXX_NS::Level::getError(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2279#define LOG4CXX_ASSERT(logger, condition, message) do { \
2280 if (!(condition) && ::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2281 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2282 LOG4CXX_STACKTRACE \
2283 logger->addEvent(::LOG4CXX_NS::Level::getError(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2295#define LOG4CXX_ASSERT_FMT(logger, condition, fmt, ...) do { \
2296 if (!(condition) && ::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2297 LOG4CXX_STACKTRACE \
2298 logger->addEvent(::LOG4CXX_NS::Level::getError(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2301#define LOG4CXX_ERROR(logger, message)
2302#define LOG4CXX_ERROR_FMT(logger, fmt, ...)
2303#define LOG4CXX_ASSERT(logger, condition, message)
2304#define LOG4CXX_ASSERT_FMT(logger, condition, fmt, ...)
2307#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
2319#define LOG4CXX_FATAL(logger, message) do { \
2320 if (::LOG4CXX_NS::Logger::isFatalEnabledFor(logger)) {\
2321 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2322 logger->addEvent(::LOG4CXX_NS::Level::getFatal(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2336#define LOG4CXX_FATAL_FMT(logger, fmt, ...) do { \
2337 if (::LOG4CXX_NS::Logger::isFatalEnabledFor(logger)) {\
2338 logger->addEvent(::LOG4CXX_NS::Level::getFatal(), ::LOG4CXX_FORMAT_NS::format(fmt, __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2340#define LOG4CXX_FATAL(logger, message)
2341#define LOG4CXX_FATAL_FMT(logger, fmt, ...)
2351#define LOG4CXX_L7DLOG(logger, level, key) do { \
2352 if (logger->isEnabledFor(level)) {\
2353 logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
2363#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
2364 if (logger->isEnabledFor(level)) {\
2365 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
2376#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
2377 if (logger->isEnabledFor(level)) {\
2378 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
2390#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
2391 if (logger->isEnabledFor(level)) {\
2392 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: log4cxx/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: log4cxx/logger.h:1134
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 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).
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 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).
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 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).
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: log4cxx/logger.h:1108
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 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).
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: log4cxx/logger.h:1048
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: log4cxx/logger.h:1160
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: log4cxx/logger.h:1082
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: log4cxx/logger.h:1186
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_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:158
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:39
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:152
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:146