18#ifndef _LOG4CXX_LOGGER_H
19#define _LOG4CXX_LOGGER_H
34class LoggerRepository;
61 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(LoggerPrivate, m_priv)
72#if LOG4CXX_ABI_VERSION <= 15
73 [[ deprecated(
"Pool is no longer required" ) ]]
122 void debug(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
137 void debug(
const std::string& msg)
const;
138#if LOG4CXX_WCHAR_T_API
154 void debug(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
169 void debug(
const std::wstring& msg)
const;
171#if LOG4CXX_UNICHAR_API
187 void debug(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
202 void debug(
const std::basic_string<UniChar>& msg)
const;
204#if LOG4CXX_CFSTRING_API
253 void error(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
268 void error(
const std::string& msg)
const;
269#if LOG4CXX_WCHAR_T_API
284 void error(
const std::wstring& msg)
const;
300 void error(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
302#if LOG4CXX_UNICHAR_API
318 void error(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
333 void error(
const std::basic_string<UniChar>& msg)
const;
335#if LOG4CXX_CFSTRING_API
384 void fatal(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
399 void fatal(
const std::string& msg)
const;
400#if LOG4CXX_WCHAR_T_API
416 void fatal(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
431 void fatal(
const std::wstring& msg)
const;
433#if LOG4CXX_UNICHAR_API
449 void fatal(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
464 void fatal(
const std::basic_string<UniChar>& msg)
const;
466#if LOG4CXX_CFSTRING_API
624 const LOG4CXX_NS::spi::LocationInfo& location)
const;
633#if LOG4CXX_WCHAR_T_API
700 const LOG4CXX_NS::spi::LocationInfo& location)
const;
709#if LOG4CXX_UNICHAR_API
770 const LOG4CXX_NS::spi::LocationInfo& location)
const;
779#if LOG4CXX_CFSTRING_API
788 const LOG4CXX_NS::spi::LocationInfo& location)
const;
815 const LOG4CXX_NS::spi::LocationInfo& location)
const;
846#if LOG4CXX_ABI_VERSION <= 15
865#if LOG4CXX_WCHAR_T_API
872#if LOG4CXX_UNICHAR_API
877 void getName(std::basic_string<UniChar>& name)
const;
879#if LOG4CXX_CFSTRING_API
903#if 15 < LOG4CXX_ABI_VERSION
920#if LOG4CXX_WCHAR_T_API
932#if LOG4CXX_UNICHAR_API
939#if LOG4CXX_CFSTRING_API
971 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
986 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
987#if LOG4CXX_WCHAR_T_API
1002 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
1004#if LOG4CXX_UNICHAR_API
1019 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
1021#if LOG4CXX_CFSTRING_API
1036 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
1078 void info(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1093 void info(
const std::string& msg)
const;
1094#if LOG4CXX_WCHAR_T_API
1110 void info(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1125 void info(
const std::wstring& msg)
const;
1127#if LOG4CXX_UNICHAR_API
1141 void info(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1156 void info(
const std::basic_string<UniChar>& msg)
const;
1158#if LOG4CXX_CFSTRING_API
1256 return logger && logger->m_threshold <=
Level::DEBUG_INT && logger->isDebugEnabled();
1290 return logger && logger->m_threshold <=
Level::INFO_INT && logger->isInfoEnabled();
1316 return logger && logger->m_threshold <=
Level::WARN_INT && logger->isWarnEnabled();
1342 return logger && logger->m_threshold <=
Level::ERROR_INT && logger->isErrorEnabled();
1368 return logger && logger->m_threshold <=
Level::FATAL_INT && logger->isFatalEnabled();
1394 return logger && logger->m_threshold <=
Level::TRACE_INT && logger->isTraceEnabled();
1416 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1417 const std::vector<LogString>& values)
const;
1434 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1453 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1454 const std::string& val)
const;
1474 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1475 const std::string& val1,
const std::string& val2)
const;
1496 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1497 const std::string& val1,
const std::string& val2,
const std::string& val3)
const;
1499#if LOG4CXX_WCHAR_T_API
1516 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1535 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1536 const std::wstring& val)
const;
1556 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1557 const std::wstring& val1,
const std::wstring& val2)
const;
1578 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1579 const std::wstring& val1,
const std::wstring& val2,
const std::wstring& val3)
const;
1581#if LOG4CXX_UNICHAR_API
1598 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1617 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1618 const std::basic_string<UniChar>& val)
const;
1638 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1639 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2)
const;
1660 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1661 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2,
1662 const std::basic_string<UniChar>& val3)
const;
1664#if LOG4CXX_CFSTRING_API
1681 const LOG4CXX_NS::spi::LocationInfo& locationInfo)
const;
1700 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1721 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1743 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1757 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1767#if LOG4CXX_WCHAR_T_API
1777 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1788#if LOG4CXX_UNICHAR_API
1797 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message,
1798 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1807 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message)
const;
1809#if LOG4CXX_CFSTRING_API
1819 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1839 const LOG4CXX_NS::spi::LocationInfo& location)
const;
1913#if LOG4CXX_WCHAR_T_API
1929 void warn(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1944 void warn(
const std::wstring& msg)
const;
1946#if LOG4CXX_UNICHAR_API
1962 void warn(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
1977 void warn(
const std::basic_string<UniChar>& msg)
const;
1979#if LOG4CXX_CFSTRING_API
2027 void warn(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
2042 void warn(
const std::string& msg)
const;
2044#if LOG4CXX_WCHAR_T_API
2060 void trace(
const std::wstring& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
2075 void trace(
const std::wstring& msg)
const;
2077#if LOG4CXX_UNICHAR_API
2093 void trace(
const std::basic_string<UniChar>& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
2108 void trace(
const std::basic_string<UniChar>& msg)
const;
2110#if LOG4CXX_CFSTRING_API
2158 void trace(
const std::string& msg,
const LOG4CXX_NS::spi::LocationInfo& location)
const;
2173 void trace(
const std::string& msg)
const;
2193#if !defined(LOG4CXX_UNLIKELY)
2201 #define LOG4CXX_UNLIKELY(expr) __builtin_expect(expr, 0)
2209 #define LOG4CXX_UNLIKELY(expr) expr
2213#if defined(LOG4CXX_ENABLE_STACKTRACE) && !defined(LOG4CXX_STACKTRACE)
2214 #ifndef __has_include
2215 #include <boost/stacktrace.hpp>
2216 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
2217 #elif __has_include(<stacktrace>)
2218 #include <stacktrace>
2219 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + std::stacktrace::to_string(std::stacktrace::stacktrace()));
2220 #elif __has_include(<boost/stacktrace.hpp>)
2221 #include <boost/stacktrace.hpp>
2222 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
2224 #warning "Stacktrace requested but no implementation found"
2228#if !defined(LOG4CXX_STACKTRACE)
2229#define LOG4CXX_STACKTRACE
2232#ifndef LOG4CXX_FMT_VA_ARG
2233#if __cplusplus >= 202002L
2234 #define LOG4CXX_FMT_VA_ARG(...) __VA_OPT__(,) __VA_ARGS__
2236 #define LOG4CXX_FMT_VA_ARG(...) , __VA_ARGS__
2251#define LOG4CXX_LOG(logger, level, message) do { \
2252 if (logger->isEnabledFor(level)) {\
2253 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2254 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2264#define LOG4CXX_LOG_FMT(logger, level, fmt, ...) do { \
2265 if (logger->isEnabledFor(level)) {\
2266 logger->addEvent(level, ::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__) ), LOG4CXX_LOCATION); }} while (0)
2275#define LOG4CXX_LOGLS(logger, level, message) do { \
2276 if (logger->isEnabledFor(level)) {\
2277 ::LOG4CXX_NS::helpers::LogCharMessageBuffer oss_; \
2278 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2280#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
2300#define LOG4CXX_DEBUG(logger, message) do { \
2301 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isDebugEnabledFor(logger))) {\
2302 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2303 logger->addDebugEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2324#define LOG4CXX_DEBUG_FMT(logger, fmt, ...) do { \
2325 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isDebugEnabledFor(logger))) {\
2326 logger->addDebugEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__) ), LOG4CXX_LOCATION); }} while (0)
2328#define LOG4CXX_DEBUG(logger, message)
2329#define LOG4CXX_DEBUG_FMT(logger, fmt, ...)
2332#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
2344#define LOG4CXX_TRACE(logger, message) do { \
2345 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isTraceEnabledFor(logger))) {\
2346 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2347 logger->addTraceEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2361#define LOG4CXX_TRACE_FMT(logger, fmt, ...) do { \
2362 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isTraceEnabledFor(logger))) {\
2363 logger->addTraceEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2365#define LOG4CXX_TRACE(logger, message)
2366#define LOG4CXX_TRACE_FMT(logger, fmt, ...)
2369#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
2386#define LOG4CXX_INFO(logger, message) do { \
2387 if (::LOG4CXX_NS::Logger::isInfoEnabledFor(logger)) {\
2388 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2389 logger->addInfoEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2407#define LOG4CXX_INFO_FMT(logger, fmt, ...) do { \
2408 if (::LOG4CXX_NS::Logger::isInfoEnabledFor(logger)) {\
2409 logger->addInfoEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2411#define LOG4CXX_INFO(logger, message)
2412#define LOG4CXX_INFO_FMT(logger, fmt, ...)
2415#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
2430#define LOG4CXX_WARN(logger, message) do { \
2431 if (::LOG4CXX_NS::Logger::isWarnEnabledFor(logger)) {\
2432 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2433 logger->addWarnEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2450#define LOG4CXX_WARN_FMT(logger, fmt, ...) do { \
2451 if (::LOG4CXX_NS::Logger::isWarnEnabledFor(logger)) {\
2452 logger->addWarnEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2454#define LOG4CXX_WARN(logger, message)
2455#define LOG4CXX_WARN_FMT(logger, fmt, ...)
2458#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
2473#define LOG4CXX_ERROR(logger, message) do { \
2474 if (::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2475 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2476 logger->addErrorEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2493#define LOG4CXX_ERROR_FMT(logger, fmt, ...) do { \
2494 if (::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2495 logger->addErrorEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2504#define LOG4CXX_ASSERT(logger, condition, message) do { \
2505 if (!(condition) && ::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2506 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2507 LOG4CXX_STACKTRACE \
2508 logger->addErrorEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2520#define LOG4CXX_ASSERT_FMT(logger, condition, fmt, ...) do { \
2521 if (!(condition) && ::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2522 LOG4CXX_STACKTRACE \
2523 logger->addErrorEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2526#define LOG4CXX_ERROR(logger, message)
2527#define LOG4CXX_ERROR_FMT(logger, fmt, ...)
2528#define LOG4CXX_ASSERT(logger, condition, message)
2529#define LOG4CXX_ASSERT_FMT(logger, condition, fmt, ...)
2532#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
2544#define LOG4CXX_FATAL(logger, message) do { \
2545 if (::LOG4CXX_NS::Logger::isFatalEnabledFor(logger)) {\
2546 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2547 logger->addFatalEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2561#define LOG4CXX_FATAL_FMT(logger, fmt, ...) do { \
2562 if (::LOG4CXX_NS::Logger::isFatalEnabledFor(logger)) {\
2563 logger->addFatalEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2565#define LOG4CXX_FATAL(logger, message)
2566#define LOG4CXX_FATAL_FMT(logger, fmt, ...)
2576#define LOG4CXX_L7DLOG(logger, level, key) do { \
2577 if (logger->isEnabledFor(level)) {\
2578 logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
2588#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
2589 if (logger->isEnabledFor(level)) {\
2590 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
2601#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
2602 if (logger->isEnabledFor(level)) {\
2603 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
2615#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
2616 if (logger->isEnabledFor(level)) {\
2617 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }} while (0)
#define LOG4CXX_16_VIRTUAL_SPECIFIER
Definition appenderattachable.h:99
@ DEBUG_INT
Definition level.h:216
@ WARN_INT
Definition level.h:214
@ INFO_INT
Definition level.h:215
@ ERROR_INT
Definition level.h:213
@ FATAL_INT
Definition level.h:212
@ TRACE_INT
Definition level.h:217
This is the central class in the log4cxx package.
Definition log4cxx/logger.h:52
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 addWarnEvent(std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new warning level logging event containing message and location to attached appender(s) without...
void addDebugEvent(std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new debug level logging event containing message and location to attached appender(s) without f...
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...
friend class Hierarchy
Definition log4cxx/logger.h:1878
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:1340
void addDebugEvent(helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new DEBUG level LoggingEvent which was requested at sourceLocation wher...
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)
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) without further check...
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 addWarnEvent(std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new warning level logging event containing message and location to attached appender(s) without...
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 addWarnEvent(std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new warning level logging event containing message and location to attached appender(s) without...
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...
void addInfoEvent(std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new info level logging event containing message and location to attached appender(s) without fu...
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.
void addTraceEvent(std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new trace level logging event containing message and location to attached appender(s) without f...
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 ...
spi::LoggerRepository * getLoggerRepository() const
Return the the LoggerRepository where this Logger is attached.
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 FATAL 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 addEvent(const LevelPtr &level, helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &sourceLocation=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new level LoggingEvent which was requested at sourceLocation where the ...
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) without further check...
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) without further check...
void fatal(const std::wstring &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL 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 addFatalEvent(std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new fatal level logging event containing message and location to attached appender(s) without f...
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) without further check...
void forcedLog(const LevelPtr &level, const std::basic_string< UniChar > &message) const
Add a new logging event containing message to attached appender(s) without further checks.
static bool isWarnEnabledFor(const LoggerPtr &logger)
Is logger is enabled for WARN level logging events?
Definition log4cxx/logger.h:1314
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) without further check...
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 replaceAppenders(const AppenderList &newList) LOG4CXX_16_VIRTUAL_SPECIFIER
Replace all previously added appenders with newList.
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 addFatalEvent(helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new FATAL level LoggingEvent which was requested at sourceLocation wher...
void addFatalEvent(std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new fatal level logging event containing message and location to attached appender(s) without f...
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) without further check...
void forcedLog(const LevelPtr &level, const CFStringRef &message) const
Add a new logging event containing message to attached appender(s) without further checks.
void addInfoEvent(std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new info level logging event containing message and location to attached appender(s) without fu...
void fatal(const std::string &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for FATAL 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...
void addErrorEvent(std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new error level logging event containing message and location to attached appender(s) without f...
static bool isDebugEnabledFor(const LoggerPtr &logger)
Is logger is enabled for DEBUG level logging events?
Definition log4cxx/logger.h:1254
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 callAppenders(const spi::LoggingEventPtr &event, helpers::Pool &p) const
Call the appenders in the hierrachy starting at this.
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:1366
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 addInfoEvent(helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new INFO level LoggingEvent which was requested at sourceLocation where...
void addErrorEvent(std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new error level logging event containing message and location to attached appender(s) without f...
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) without further check...
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 FATAL ev...
Logger(const LogString &name)
This constructor initializes a new logger instance and sets its name.
void addFatalEvent(std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new fatal level logging event containing message and location to attached appender(s) without f...
static bool isInfoEnabledFor(const LoggerPtr &logger)
Is logger is enabled for INFO level logging events?
Definition log4cxx/logger.h:1288
static LoggerPtr getLogger(const std::string &name)
Retrieve a logger by name in current encoding.
bool replaceAppender(const AppenderPtr &oldAppender, const AppenderPtr &newAppender) LOG4CXX_16_VIRTUAL_SPECIFIER
Replace oldAppender with newAppender.
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) without further check...
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) without further checks.
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 addErrorEvent(helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new ERROR level LoggingEvent which was requested at sourceLocation wher...
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 addTraceEvent(std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new trace level logging event containing message and location to attached appender(s) without f...
void addTraceEvent(helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new TRACE level LoggingEvent which was requested at sourceLocation wher...
void addDebugEvent(std::basic_string< UniChar > &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new debug level logging event containing message and location to attached appender(s) without f...
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) without further check...
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 addErrorEvent(std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new error level logging event containing message and location to attached appender(s) without f...
void reconfigure(const AppenderList &newList, bool newAdditivity)
Replace all current appenders with newList and set the additivity flag to newAdditivity.
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 addWarnEvent(helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new WARN level LoggingEvent which was requested at sourceLocation where...
void getName(std::basic_string< UniChar > &name) const
Put name of this logger into name.
void addInfoEvent(std::wstring &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new info level logging event containing message and location to attached appender(s) without fu...
void addDebugEvent(std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new debug level logging event containing message and location to attached appender(s) without f...
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:1392
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...
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 addTraceEvent(std::string &&message, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add a new trace level logging event containing message and location to attached appender(s) without f...
void forcedLog(const LevelPtr &level, const std::string &message) const
Add a new logging event containing message to attached appender(s) without further checks.
bool isTraceEnabled() const
Is this logger is enabled for TRACE level logging events?
This class is used by the LOG4CXX_INFO_ASYNC and similar macros to support insertion operators.
Definition asyncbuffer.h:46
This Interface is for attaching Appenders to objects.
Definition appenderattachable.h:33
This class represents the location of a logging statement.
Definition locationinfo.h:40
static const LocationInfo & getLocationUnavailable()
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
std::shared_ptr< LoggerRepository > LoggerRepositoryPtr
Definition optionconverter.h:33
LOG4CXX_PTR_DEF(LoggerRepository)
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition appender.h:32
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:154
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition object.h:37
#define END_LOG4CXX_CAST_MAP()
Definition object.h:148
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:142