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
507 ,
const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
526#if LOG4CXX_WCHAR_T_API
535 ,
const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
554#if LOG4CXX_UNICHAR_API
563 const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
const;
581#if LOG4CXX_CFSTRING_API
607 ,
const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable())
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
781#if LOG4CXX_WCHAR_T_API
798#if LOG4CXX_UNICHAR_API
815#if LOG4CXX_CFSTRING_API
887 void info(
const std::string& msg)
const;
888#if LOG4CXX_WCHAR_T_API
919 void info(
const std::wstring& msg)
const;
921#if LOG4CXX_UNICHAR_API
950 void info(
const std::basic_string<UniChar>& msg)
const;
952#if LOG4CXX_CFSTRING_API
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();
1211 const std::vector<LogString>& values)
const;
1248 const std::string& val)
const;
1269 const std::string& val1,
const std::string& val2)
const;
1291 const std::string& val1,
const std::string& val2,
const std::string& val3)
const;
1293#if LOG4CXX_WCHAR_T_API
1330 const std::wstring& val)
const;
1351 const std::wstring& val1,
const std::wstring& val2)
const;
1373 const std::wstring& val1,
const std::wstring& val2,
const std::wstring& val3)
const;
1375#if LOG4CXX_UNICHAR_API
1412 const std::basic_string<UniChar>& val)
const;
1433 const std::basic_string<UniChar>& val1,
const std::basic_string<UniChar>& val2)
const;
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
1561#if LOG4CXX_WCHAR_T_API
1582#if LOG4CXX_UNICHAR_API
1591 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message,
1601 void log(
const LevelPtr& level,
const std::basic_string<UniChar>& message)
const;
1603#if LOG4CXX_CFSTRING_API
1696#if LOG4CXX_WCHAR_T_API
1727 void warn(
const std::wstring& msg)
const;
1729#if LOG4CXX_UNICHAR_API
1760 void warn(
const std::basic_string<UniChar>& msg)
const;
1762#if LOG4CXX_CFSTRING_API
1825 void warn(
const std::string& msg)
const;
1827#if LOG4CXX_WCHAR_T_API
1858 void trace(
const std::wstring& msg)
const;
1860#if LOG4CXX_UNICHAR_API
1891 void trace(
const std::basic_string<UniChar>& msg)
const;
1893#if LOG4CXX_CFSTRING_API
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::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::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::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::helpers::MessageBuffer oss_; \
2029 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2038#define LOG4CXX_LOG_FMT(logger, level, ...) do { \
2039 if (logger->isEnabledFor(level)) {\
2040 logger->addEvent(level, fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2049#define LOG4CXX_LOGLS(logger, level, message) do { \
2050 if (logger->isEnabledFor(level)) {\
2051 ::log4cxx::helpers::LogCharMessageBuffer oss_; \
2052 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2054#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
2073#define LOG4CXX_DEBUG(logger, message) do { \
2074 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isDebugEnabledFor(logger))) {\
2075 ::log4cxx::helpers::MessageBuffer oss_; \
2076 logger->addEvent(::log4cxx::Level::getDebug(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2084#define LOG4CXX_DEBUG_FMT(logger, ...) do { \
2085 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isDebugEnabledFor(logger))) {\
2086 logger->addEvent(::log4cxx::Level::getDebug(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2088#define LOG4CXX_DEBUG(logger, message)
2089#define LOG4CXX_DEBUG_FMT(logger, ...)
2092#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
2105#define LOG4CXX_TRACE(logger, message) do { \
2106 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isTraceEnabledFor(logger))) {\
2107 ::log4cxx::helpers::MessageBuffer oss_; \
2108 logger->addEvent(::log4cxx::Level::getTrace(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2116#define LOG4CXX_TRACE_FMT(logger, ...) do { \
2117 if (LOG4CXX_UNLIKELY(::log4cxx::Logger::isTraceEnabledFor(logger))) {\
2118 logger->addEvent(::log4cxx::Level::getTrace(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2120#define LOG4CXX_TRACE(logger, message)
2121#define LOG4CXX_TRACE_FMT(logger, ...)
2124#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
2141#define LOG4CXX_INFO(logger, message) do { \
2142 if (::log4cxx::Logger::isInfoEnabledFor(logger)) {\
2143 ::log4cxx::helpers::MessageBuffer oss_; \
2144 logger->addEvent(::log4cxx::Level::getInfo(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2152#define LOG4CXX_INFO_FMT(logger, ...) do { \
2153 if (::log4cxx::Logger::isInfoEnabledFor(logger)) {\
2154 logger->addEvent(::log4cxx::Level::getInfo(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2156#define LOG4CXX_INFO(logger, message)
2157#define LOG4CXX_INFO_FMT(logger, ...)
2160#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
2175#define LOG4CXX_WARN(logger, message) do { \
2176 if (::log4cxx::Logger::isWarnEnabledFor(logger)) {\
2177 ::log4cxx::helpers::MessageBuffer oss_; \
2178 logger->addEvent(::log4cxx::Level::getWarn(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2186#define LOG4CXX_WARN_FMT(logger, ...) do { \
2187 if (::log4cxx::Logger::isWarnEnabledFor(logger)) {\
2188 logger->addEvent(::log4cxx::Level::getWarn(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2190#define LOG4CXX_WARN(logger, message)
2191#define LOG4CXX_WARN_FMT(logger, ...)
2194#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
2209#define LOG4CXX_ERROR(logger, message) do { \
2210 if (::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2211 ::log4cxx::helpers::MessageBuffer oss_; \
2212 logger->addEvent(::log4cxx::Level::getError(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2220#define LOG4CXX_ERROR_FMT(logger, ...) do { \
2221 if (::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2222 logger->addEvent(::log4cxx::Level::getError(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2231#define LOG4CXX_ASSERT(logger, condition, message) do { \
2232 if (!(condition) && ::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2233 ::log4cxx::helpers::MessageBuffer oss_; \
2234 LOG4CXX_STACKTRACE \
2235 logger->addEvent(::log4cxx::Level::getError(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2244#define LOG4CXX_ASSERT_FMT(logger, condition, ...) do { \
2245 if (!(condition) && ::log4cxx::Logger::isErrorEnabledFor(logger)) {\
2246 LOG4CXX_STACKTRACE \
2247 logger->addEvent(::log4cxx::Level::getError(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2250#define LOG4CXX_ERROR(logger, message)
2251#define LOG4CXX_ERROR_FMT(logger, ...)
2252#define LOG4CXX_ASSERT(logger, condition, message)
2253#define LOG4CXX_ASSERT_FMT(logger, condition, ...)
2256#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
2268#define LOG4CXX_FATAL(logger, message) do { \
2269 if (::log4cxx::Logger::isFatalEnabledFor(logger)) {\
2270 ::log4cxx::helpers::MessageBuffer oss_; \
2271 logger->addEvent(::log4cxx::Level::getFatal(), oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2279#define LOG4CXX_FATAL_FMT(logger, ...) do { \
2280 if (::log4cxx::Logger::isFatalEnabledFor(logger)) {\
2281 logger->addEvent(::log4cxx::Level::getFatal(), fmt::format( __VA_ARGS__ ), LOG4CXX_LOCATION); }} while (0)
2283#define LOG4CXX_FATAL(logger, message)
2284#define LOG4CXX_FATAL_FMT(logger, ...)
2294#define LOG4CXX_L7DLOG(logger, level, key) do { \
2295 if (logger->isEnabledFor(level)) {\
2296 logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
2306#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
2307 if (logger->isEnabledFor(level)) {\
2308 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
2319#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
2320 if (logger->isEnabledFor(level)) {\
2321 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
2333#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
2334 if (logger->isEnabledFor(level)) {\
2335 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_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: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