Apache Log4cxx  Version 2.0.0
Loading...
Searching...
No Matches
log4cxx/logger.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _LOG4CXX_LOGGER_H
19#define _LOG4CXX_LOGGER_H
20
22#include <log4cxx/level.h>
28
29namespace LOG4CXX_NS
30{
31
32namespace spi
33{
34class LoggerRepository;
36class LoggerFactory;
38}
39
40class Logger;
43
44
49class LOG4CXX_EXPORT Logger
50 : public virtual spi::AppenderAttachable
51{
52 public:
58
59 private:
60 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(LoggerPrivate, m_priv)
61 int m_threshold;
62
63 public:
70 Logger(const LogString& name);
72
73
81 void addAppender(const AppenderPtr newAppender) override;
82
83
89 void callAppenders(const spi::LoggingEventPtr& event) const;
90
96
110 void debug(const std::string& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
125 void debug(const std::string& msg) const;
126#if LOG4CXX_WCHAR_T_API
142 void debug(const std::wstring& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
157 void debug(const std::wstring& msg) const;
158#endif
159#if LOG4CXX_CFSTRING_API
175 void debug(const CFStringRef& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
190 void debug(const CFStringRef& msg) const;
191#endif
192
208 void error(const std::string& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
223 void error(const std::string& msg) const;
224#if LOG4CXX_WCHAR_T_API
239 void error(const std::wstring& msg) const;
255 void error(const std::wstring& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
256#endif
257#if LOG4CXX_CFSTRING_API
273 void error(const CFStringRef& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
288 void error(const CFStringRef& msg) const;
289#endif
290
306 void fatal(const std::string& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
321 void fatal(const std::string& msg) const;
322#if LOG4CXX_WCHAR_T_API
338 void fatal(const std::wstring& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
353 void fatal(const std::wstring& msg) const;
354#endif
355#if LOG4CXX_CFSTRING_API
371 void fatal(const CFStringRef& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
386 void fatal(const CFStringRef& msg) const;
387#endif
388
396 void addEvent(const LevelPtr& level, std::string&& message
398
406 void addEvent(const LevelPtr& level, helpers::AsyncBuffer&& messageAppender
408
415 void addFatalEvent(std::string&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
416
424
431 void addErrorEvent(std::string&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
432
440
447 void addWarnEvent(std::string&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
448
456
463 void addInfoEvent(std::string&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
464
472
479 void addDebugEvent(std::string&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
480
488
495 void addTraceEvent(std::string&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
496
504
512 void forcedLog(const LevelPtr& level, const std::string& message,
513 const LOG4CXX_NS::spi::LocationInfo& location) const;
520 void forcedLog(const LevelPtr& level, const std::string& message) const;
521
522#if LOG4CXX_WCHAR_T_API
530 void addEvent(const LevelPtr& level, std::wstring&& message
532
539 void addFatalEvent(std::wstring&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
540
547 void addErrorEvent(std::wstring&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
548
555 void addWarnEvent(std::wstring&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
556
563 void addInfoEvent(std::wstring&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
564
571 void addDebugEvent(std::wstring&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
572
579 void addTraceEvent(std::wstring&& message, const spi::LocationInfo& location = spi::LocationInfo::getLocationUnavailable()) const;
580
588 void forcedLog(const LevelPtr& level, const std::wstring& message,
589 const LOG4CXX_NS::spi::LocationInfo& location) const;
596 void forcedLog(const LevelPtr& level, const std::wstring& message) const;
597#endif
598#if LOG4CXX_CFSTRING_API
606 void forcedLog(const LevelPtr& level, const CFStringRef& message,
607 const LOG4CXX_NS::spi::LocationInfo& location) const;
614 void forcedLog(const LevelPtr& level, const CFStringRef& message) const;
615#endif
623 void addEventLS(const LevelPtr& level, LogString&& message
625
633 void forcedLogLS(const LevelPtr& level, const LogString& message,
634 const LOG4CXX_NS::spi::LocationInfo& location) const;
635
639 bool getAdditivity() const;
640
646 AppenderList getAllAppenders() const override;
647
652 AppenderPtr getAppender(const LogString& name) const override;
653
663 virtual const LevelPtr& getEffectiveLevel() const;
664
665
670 const LogString& getName() const;
671
676 void getName(std::string& name) const;
677#if LOG4CXX_WCHAR_T_API
682 void getName(std::wstring& name) const;
683#endif
684#if LOG4CXX_CFSTRING_API
689 void getName(CFStringRef& name) const;
690#endif
691
699
700
706 const LevelPtr& getLevel() const;
707
712
717 static LoggerPtr getLogger(const std::string& name);
722 static LoggerPtr getLogger(const char* const name);
723#if LOG4CXX_WCHAR_T_API
728 static LoggerPtr getLogger(const std::wstring& name);
733 static LoggerPtr getLogger(const wchar_t* const name);
734#endif
735#if LOG4CXX_CFSTRING_API
740 static LoggerPtr getLogger(const CFStringRef& name);
741#endif
746 static LoggerPtr getLoggerLS(const LogString& name);
747
752
766 static LoggerPtr getLoggerLS(const LogString& name,
767 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
781 static LoggerPtr getLogger(const std::string& name,
782 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
783#if LOG4CXX_WCHAR_T_API
797 static LoggerPtr getLogger(const std::wstring& name,
798 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
799#endif
800#if LOG4CXX_CFSTRING_API
814 static LoggerPtr getLogger(const CFStringRef& name,
815 const LOG4CXX_NS::spi::LoggerFactoryPtr& factory);
816#endif
817
827 helpers::ResourceBundlePtr getResourceBundle() const;
828
829 protected:
840
841 public:
857 void info(const std::string& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
872 void info(const std::string& msg) const;
873#if LOG4CXX_WCHAR_T_API
889 void info(const std::wstring& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
904 void info(const std::wstring& msg) const;
905#endif
906#if LOG4CXX_CFSTRING_API
922 void info(const CFStringRef& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
937 void info(const CFStringRef& msg) const;
938#endif
939
943 bool isAttached(const AppenderPtr appender) const override;
944
979 bool isDebugEnabled() const;
980
1002 inline static bool isDebugEnabledFor(const LoggerPtr& logger)
1003 {
1004 return logger && logger->m_threshold <= Level::DEBUG_INT && logger->isDebugEnabled();
1005 }
1006
1012 bool isEnabledFor(const LevelPtr& level) const;
1013
1014
1024 bool isInfoEnabled() const;
1025
1036 inline static bool isInfoEnabledFor(const LoggerPtr& logger)
1037 {
1038 return logger && logger->m_threshold <= Level::INFO_INT && logger->isInfoEnabled();
1039 }
1040
1050 bool isWarnEnabled() const;
1051
1062 inline static bool isWarnEnabledFor(const LoggerPtr& logger)
1063 {
1064 return logger && logger->m_threshold <= Level::WARN_INT && logger->isWarnEnabled();
1065 }
1066
1076 bool isErrorEnabled() const;
1077
1088 inline static bool isErrorEnabledFor(const LoggerPtr& logger)
1089 {
1090 return logger && logger->m_threshold <= Level::ERROR_INT && logger->isErrorEnabled();
1091 }
1092
1102 bool isFatalEnabled() const;
1103
1114 inline static bool isFatalEnabledFor(const LoggerPtr& logger)
1115 {
1116 return logger && logger->m_threshold <= Level::FATAL_INT && logger->isFatalEnabled();
1117 }
1118
1128 bool isTraceEnabled() const;
1129
1140 inline static bool isTraceEnabledFor(const LoggerPtr& logger)
1141 {
1142 return logger && logger->m_threshold <= Level::TRACE_INT && logger->isTraceEnabled();
1143 }
1144
1163 void l7dlog(const LevelPtr& level, const LogString& key,
1164 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1165 const std::vector<LogString>& values) const;
1181 void l7dlog(const LevelPtr& level, const std::string& key,
1182 const LOG4CXX_NS::spi::LocationInfo& locationInfo) const;
1200 void l7dlog(const LevelPtr& level, const std::string& key,
1201 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1202 const std::string& val) const;
1221 void l7dlog(const LevelPtr& level, const std::string& key,
1222 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1223 const std::string& val1, const std::string& val2) const;
1243 void l7dlog(const LevelPtr& level, const std::string& key,
1244 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1245 const std::string& val1, const std::string& val2, const std::string& val3) const;
1246
1247#if LOG4CXX_WCHAR_T_API
1263 void l7dlog(const LevelPtr& level, const std::wstring& key,
1264 const LOG4CXX_NS::spi::LocationInfo& locationInfo) const;
1282 void l7dlog(const LevelPtr& level, const std::wstring& key,
1283 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1284 const std::wstring& val) const;
1303 void l7dlog(const LevelPtr& level, const std::wstring& key,
1304 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1305 const std::wstring& val1, const std::wstring& val2) const;
1325 void l7dlog(const LevelPtr& level, const std::wstring& key,
1326 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1327 const std::wstring& val1, const std::wstring& val2, const std::wstring& val3) const;
1328#endif
1329#if LOG4CXX_CFSTRING_API
1345 void l7dlog(const LevelPtr& level, const CFStringRef& key,
1346 const LOG4CXX_NS::spi::LocationInfo& locationInfo) const;
1364 void l7dlog(const LevelPtr& level, const CFStringRef& key,
1365 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1366 const CFStringRef& val1) const;
1385 void l7dlog(const LevelPtr& level, const CFStringRef& key,
1386 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1387 const CFStringRef& val1, const CFStringRef& val2) const;
1407 void l7dlog(const LevelPtr& level, const CFStringRef& key,
1408 const LOG4CXX_NS::spi::LocationInfo& locationInfo,
1409 const CFStringRef& val1, const CFStringRef& val2,
1410 const CFStringRef& val3) const;
1411#endif
1412
1421 void log(const LevelPtr& level, const std::string& message,
1422 const LOG4CXX_NS::spi::LocationInfo& location) const;
1431 void log(const LevelPtr& level, const std::string& message) const;
1432#if LOG4CXX_WCHAR_T_API
1441 void log(const LevelPtr& level, const std::wstring& message,
1442 const LOG4CXX_NS::spi::LocationInfo& location) const;
1451 void log(const LevelPtr& level, const std::wstring& message) const;
1452#endif
1453#if LOG4CXX_CFSTRING_API
1462 void log(const LevelPtr& level, const CFStringRef& message,
1463 const LOG4CXX_NS::spi::LocationInfo& location) const;
1472 void log(const LevelPtr& level, const CFStringRef& message) const;
1473#endif
1482 void logLS(const LevelPtr& level, const LogString& message,
1483 const LOG4CXX_NS::spi::LocationInfo& location) const;
1484
1485
1486
1492 void removeAllAppenders() override;
1493
1497 void removeAppender(const AppenderPtr appender) override;
1498
1503 void removeAppender(const LogString& name) override;
1504
1509 bool replaceAppender(const AppenderPtr& oldAppender, const AppenderPtr& newAppender) override;
1510
1514 void replaceAppenders(const AppenderList& newList) override;
1515
1519 void setAdditivity(bool additive);
1520
1521 protected:
1522 friend class Hierarchy;
1523
1535 void setParent(LoggerPtr parentLogger);
1540
1541 public: // Unit testing support methods
1542 void changeParentTo(const LoggerPtr& otherLogger) { setParent(otherLogger); }
1543
1546 bool isThresholdEqualTo(const LevelPtr& level) const;
1547
1550 bool isThresholdEqualTo(const LoggerPtr& other) const;
1551
1554 bool isThresholdValid() const;
1555
1556 private:
1557 spi::LoggerRepository* getHierarchy() const;
1558
1559 public:
1566 virtual void setLevel(const LevelPtr level);
1567
1571 void setResourceBundle(const helpers::ResourceBundlePtr& bundle);
1572
1573#if LOG4CXX_WCHAR_T_API
1589 void warn(const std::wstring& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
1604 void warn(const std::wstring& msg) const;
1605#endif
1606#if LOG4CXX_CFSTRING_API
1622 void warn(const CFStringRef& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
1637 void warn(const CFStringRef& msg) const;
1638#endif
1654 void warn(const std::string& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
1669 void warn(const std::string& msg) const;
1670
1671#if LOG4CXX_WCHAR_T_API
1687 void trace(const std::wstring& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
1702 void trace(const std::wstring& msg) const;
1703#endif
1704#if LOG4CXX_CFSTRING_API
1720 void trace(const CFStringRef& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
1735 void trace(const CFStringRef& msg) const;
1736#endif
1752 void trace(const std::string& msg, const LOG4CXX_NS::spi::LocationInfo& location) const;
1767 void trace(const std::string& msg) const;
1768
1776 void reconfigure( const AppenderList& newList, bool newAdditivity );
1777
1778 private:
1779 //
1780 // prevent copy and assignment
1781 Logger(const Logger&);
1782 Logger& operator=(const Logger&);
1783};
1785}
1786
1787#if !defined(LOG4CXX_UNLIKELY)
1788 #if __GNUC__ >= 3
1795 #define LOG4CXX_UNLIKELY(expr) __builtin_expect(expr, 0)
1796 #else
1803 #define LOG4CXX_UNLIKELY(expr) expr
1804 #endif
1805#endif
1806
1807#if defined(LOG4CXX_ENABLE_STACKTRACE) && !defined(LOG4CXX_STACKTRACE)
1808 #ifndef __has_include
1809 #include <boost/stacktrace.hpp>
1810 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
1811 #elif __has_include(<stacktrace>)
1812 #include <stacktrace>
1813 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + std::stacktrace::to_string(std::stacktrace::stacktrace()));
1814 #elif __has_include(<boost/stacktrace.hpp>)
1815 #include <boost/stacktrace.hpp>
1816 #define LOG4CXX_STACKTRACE ::LOG4CXX_NS::MDC mdc_("stacktrace", LOG4CXX_EOL + boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
1817 #else
1818 #warning "Stacktrace requested but no implementation found"
1819 #endif
1820#endif /* LOG4CXX_ENABLE_STACKTRACE */
1821
1822#if !defined(LOG4CXX_STACKTRACE)
1823#define LOG4CXX_STACKTRACE
1824#endif
1825
1826#ifndef LOG4CXX_FMT_VA_ARG
1827 #define LOG4CXX_FMT_VA_ARG(...) , __VA_ARGS__
1828#endif
1829
1833
1841#define LOG4CXX_LOG(logger, level, message) do { \
1842 if (logger->isEnabledFor(level)) {\
1843 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
1844 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1845
1854#define LOG4CXX_LOG_FMT(logger, level, fmt, ...) do { \
1855 if (logger->isEnabledFor(level)) {\
1856 logger->addEvent(level, ::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__) ), LOG4CXX_LOCATION); }} while (0)
1857
1865#define LOG4CXX_LOGLS(logger, level, message) do { \
1866 if (logger->isEnabledFor(level)) {\
1867 ::LOG4CXX_NS::helpers::LogCharMessageBuffer oss_; \
1868 logger->addEvent(level, oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1869
1870#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
1890#define LOG4CXX_DEBUG(logger, message) do { \
1891 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isDebugEnabledFor(logger))) {\
1892 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
1893 logger->addDebugEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1894
1914#define LOG4CXX_DEBUG_FMT(logger, fmt, ...) do { \
1915 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isDebugEnabledFor(logger))) {\
1916 logger->addDebugEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__) ), LOG4CXX_LOCATION); }} while (0)
1917#else
1918#define LOG4CXX_DEBUG(logger, message)
1919#define LOG4CXX_DEBUG_FMT(logger, fmt, ...)
1920#endif
1921
1922#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
1934#define LOG4CXX_TRACE(logger, message) do { \
1935 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isTraceEnabledFor(logger))) {\
1936 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
1937 logger->addTraceEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1938
1951#define LOG4CXX_TRACE_FMT(logger, fmt, ...) do { \
1952 if (LOG4CXX_UNLIKELY(::LOG4CXX_NS::Logger::isTraceEnabledFor(logger))) {\
1953 logger->addTraceEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
1954#else
1955#define LOG4CXX_TRACE(logger, message)
1956#define LOG4CXX_TRACE_FMT(logger, fmt, ...)
1957#endif
1958
1959#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
1976#define LOG4CXX_INFO(logger, message) do { \
1977 if (::LOG4CXX_NS::Logger::isInfoEnabledFor(logger)) {\
1978 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
1979 logger->addInfoEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
1980
1997#define LOG4CXX_INFO_FMT(logger, fmt, ...) do { \
1998 if (::LOG4CXX_NS::Logger::isInfoEnabledFor(logger)) {\
1999 logger->addInfoEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2000#else
2001#define LOG4CXX_INFO(logger, message)
2002#define LOG4CXX_INFO_FMT(logger, fmt, ...)
2003#endif
2004
2005#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
2020#define LOG4CXX_WARN(logger, message) do { \
2021 if (::LOG4CXX_NS::Logger::isWarnEnabledFor(logger)) {\
2022 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2023 logger->addWarnEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2024
2040#define LOG4CXX_WARN_FMT(logger, fmt, ...) do { \
2041 if (::LOG4CXX_NS::Logger::isWarnEnabledFor(logger)) {\
2042 logger->addWarnEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2043#else
2044#define LOG4CXX_WARN(logger, message)
2045#define LOG4CXX_WARN_FMT(logger, fmt, ...)
2046#endif
2047
2048#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
2063#define LOG4CXX_ERROR(logger, message) do { \
2064 if (::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2065 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2066 logger->addErrorEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2067
2083#define LOG4CXX_ERROR_FMT(logger, fmt, ...) do { \
2084 if (::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2085 logger->addErrorEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2086
2094#define LOG4CXX_ASSERT(logger, condition, message) do { \
2095 if (!(condition) && ::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2096 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2097 LOG4CXX_STACKTRACE \
2098 logger->addErrorEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2099
2110#define LOG4CXX_ASSERT_FMT(logger, condition, fmt, ...) do { \
2111 if (!(condition) && ::LOG4CXX_NS::Logger::isErrorEnabledFor(logger)) {\
2112 LOG4CXX_STACKTRACE \
2113 logger->addErrorEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2114
2115#else
2116#define LOG4CXX_ERROR(logger, message)
2117#define LOG4CXX_ERROR_FMT(logger, fmt, ...)
2118#define LOG4CXX_ASSERT(logger, condition, message)
2119#define LOG4CXX_ASSERT_FMT(logger, condition, fmt, ...)
2120#endif
2121
2122#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
2134#define LOG4CXX_FATAL(logger, message) do { \
2135 if (::LOG4CXX_NS::Logger::isFatalEnabledFor(logger)) {\
2136 ::LOG4CXX_NS::helpers::MessageBuffer oss_; \
2137 logger->addFatalEvent(oss_.extract_str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
2138
2151#define LOG4CXX_FATAL_FMT(logger, fmt, ...) do { \
2152 if (::LOG4CXX_NS::Logger::isFatalEnabledFor(logger)) {\
2153 logger->addFatalEvent(::LOG4CXX_FORMAT_NS::format(fmt LOG4CXX_FMT_VA_ARG(__VA_ARGS__)), LOG4CXX_LOCATION); }} while (0)
2154#else
2155#define LOG4CXX_FATAL(logger, message)
2156#define LOG4CXX_FATAL_FMT(logger, fmt, ...)
2157#endif
2158
2166#define LOG4CXX_L7DLOG(logger, level, key) do { \
2167 if (logger->isEnabledFor(level)) {\
2168 logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
2169
2178#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
2179 if (logger->isEnabledFor(level)) {\
2180 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
2181
2191#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
2192 if (logger->isEnabledFor(level)) {\
2193 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
2194
2205#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
2206 if (logger->isEnabledFor(level)) {\
2207 logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }} while (0)
2208
2210
2212
2213#endif //_LOG4CXX_LOGGER_H
@ DEBUG_INT
Definition level.h:193
@ WARN_INT
Definition level.h:191
@ INFO_INT
Definition level.h:192
@ ERROR_INT
Definition level.h:190
@ FATAL_INT
Definition level.h:189
@ TRACE_INT
Definition level.h:194
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...
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,...
friend class Hierarchy
Definition log4cxx/logger.h:1522
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:1088
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...
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.
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 callAppenders(const spi::LoggingEventPtr &event) const
Send event to all appenders attached to this or attached to a parent of this.
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 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...
bool isThresholdEqualTo(const LoggerPtr &other) const
Is m_threshold the same as other.
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?
void replaceAppenders(const AppenderList &newList) override
Replace all previously added appenders with newList.
bool isFatalEnabled() const
Is this logger is enabled for FATAL level logging events?
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 ...
void removeAppender(const LogString &name) override
Remove the appender with the name passed as parameter form the list of appenders.
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 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 l7dlog(const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo) const
Add a new logging event containing locationInfo and the localized message key to attached appender(s)...
void trace(const std::wstring &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for TRACE ev...
void error(const std::string &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for ERROR ev...
void l7dlog(const LevelPtr &level, const CFStringRef &key, const log4cxx::spi::LocationInfo &locationInfo, const CFStringRef &val1, const CFStringRef &val2) const
Add a new logging event containing locationInfo and the localized message key using parameters val1 a...
void fatal(const std::wstring &msg) const
Add a new logging event containing msg to attached appender(s) if this logger is enabled for 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...
static bool isWarnEnabledFor(const LoggerPtr &logger)
Is logger is enabled for WARN level logging events?
Definition log4cxx/logger.h:1062
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...
bool isThresholdEqualTo(const LevelPtr &level) const
Is m_threshold the same as level->toInt().
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 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 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 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:1002
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 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:1114
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 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...
Logger(const LogString &name)
This constructor initializes a new logger instance and sets its name.
void changeParentTo(const LoggerPtr &otherLogger)
Definition log4cxx/logger.h:1542
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:1036
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) 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 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 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(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 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 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...
bool replaceAppender(const AppenderPtr &oldAppender, const AppenderPtr &newAppender) override
Replace oldAppender with newAppender.
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...
bool isThresholdValid() const
Is m_threshold the same as getEffectiveLevel()->toInt().
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:1140
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...
static spi::LoggerRepositoryPtr getLoggerRepository()
The object that holds all Logger instances.
void addEvent(const LevelPtr &level, helpers::AsyncBuffer &&messageAppender, const spi::LocationInfo &location=spi::LocationInfo::getLocationUnavailable()) const
Add to attached appender(s) a new level LoggingEvent which was requested at sourceLocation where the ...
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:56
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
LOG4CXX_PTR_DEF(LoggerRepository)
std::shared_ptr< LoggerRepository > LoggerRepositoryPtr
Definition repositoryselector.h:28
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition appender.h:32
LOG4CXX_LIST_DEF(AppenderList, AppenderPtr)
std::basic_string< logchar > LogString
Definition logstring.h:51
std::shared_ptr< Appender > AppenderPtr
Definition basicconfigurator.h:29
std::shared_ptr< Level > LevelPtr
Definition optionconverter.h:28
LOG4CXX_PTR_DEF(Appender)
std::shared_ptr< Logger > LoggerPtr
Definition logmanager.h:28
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