18#ifndef _LOG4CXX_XML_DOM_CONFIGURATOR_H
19#define _LOG4CXX_XML_DOM_CONFIGURATOR_H
23#if LOG4CXX_ABI_VERSION <= 15
37#if LOG4CXX_HAS_DOMCONFIGURATOR
67#if LOG4CXX_ABI_VERSION <= 15
76#if LOG4CXX_ABI_VERSION <= 15
83 LOG4CXX_NS::helpers::Pool& p,
84 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
94 LOG4CXX_NS::helpers::Pool& p,
95 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
96 apr_xml_elem* appenderRef,
104 LOG4CXX_NS::helpers::Pool& p,
105 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
106 apr_xml_elem* appenderElement,
114 LOG4CXX_NS::helpers::Pool& p,
115 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
116 apr_xml_elem* element,
125 LOG4CXX_NS::helpers::Pool& p,
126 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
127 apr_xml_elem* element,
128 std::vector<LOG4CXX_NS::spi::FilterPtr>& filters);
134 LOG4CXX_NS::helpers::Pool& p,
135 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
136 apr_xml_elem* loggerElement,
144 LOG4CXX_NS::helpers::Pool& p,
145 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
146 apr_xml_elem* factoryElement);
152 LOG4CXX_NS::helpers::Pool& p,
153 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
154 apr_xml_elem* factoryElement);
160 LOG4CXX_NS::helpers::Pool& p,
161 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
162 apr_xml_elem* factoryElement);
168 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
169 apr_xml_elem* rootElement, apr_xml_doc* doc,
AppenderMap& appenders);
175 LOG4CXX_NS::helpers::Pool& p,
176 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
177 apr_xml_elem* catElement,
186 LOG4CXX_NS::helpers::Pool& p,
187 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
188 apr_xml_elem* layout_element);
194 LOG4CXX_NS::helpers::Pool& p,
195 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
196 apr_xml_elem* element,
200 LOG4CXX_NS::helpers::Pool& p,
201 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
203 LOG4CXX_NS::config::PropertySetter& propSetter);
210 LOG4CXX_NS::helpers::Pool& p,
211 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
212 apr_xml_elem* element,
225#if LOG4CXX_ABI_VERSION <= 15
236#if LOG4CXX_WCHAR_T_API
246#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
252#if LOG4CXX_CFSTRING_API
265#if LOG4CXX_WCHAR_T_API
274#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
283#if LOG4CXX_CFSTRING_API
307#if LOG4CXX_WCHAR_T_API
314#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
321#if LOG4CXX_CFSTRING_API
343 (
const File& filename
344#
if LOG4CXX_ABI_VERSION <= 15
373#if LOG4CXX_ABI_VERSION <= 15
376 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
378 const std::string& attrName);
388 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(DOMConfiguratorPrivate, m_priv)
An abstract representation of file and directory path names.
Definition file.h:41
An abstract base for classes capable of configuring Log4cxx.
Definition configurator.h:40
Use this class to initialize the log4cxx environment using a DOM tree.
Definition domconfigurator.h:72
spi::ConfigurationStatus doConfigure(const File &filename, spi::LoggerRepositoryPtr repository) override
Interpret filename as an XML file and set up Log4cxx accordingly.
void parseErrorHandler(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *element, AppenderPtr &appender, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to parse an ErrorHandler element.
void parseLevel(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *element, LoggerPtr logger, bool isRoot)
Used internally to parse a level element.
static spi::ConfigurationStatus configure(const std::basic_string< UniChar > &filename)
A static version of doConfigure.
static spi::ConfigurationStatus configure(const std::wstring &filename)
A static version of doConfigure.
void parseLoggerFactory(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *factoryElement)
Used internally to parse the logger factory element.
AppenderPtr parseAppender(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *appenderElement, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to parse an appender element.
static spi::ConfigurationStatus configureAndWatch(const File &configFilename, long delay=0)
Read configuration options from configFilename (if it exists).
static spi::ConfigurationStatus configure(const char *filename)
A static version of doConfigure.
Definition domconfigurator.h:231
void parseRoot(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *rootElement, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to parse the root logger element.
static spi::ConfigurationStatus configure(const CFStringRef &filename)
A static version of doConfigure.
log4cxx::helpers::ObjectPtr parseTriggeringPolicy(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *factoryElement)
Used internally to parse the logger factory element.
AppenderPtr findAppenderByReference(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *appenderRef, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to parse appenders by IDREF element.
static spi::ConfigurationStatus configureAndWatch(const CFStringRef &configFilename, long delay)
Refer configureAndWatch(const File& filename, long delay)
static spi::ConfigurationStatus configureAndWatch(const CFStringRef &configFilename)
Like configureAndWatch(const File& filename, long delay) except that the default delay as defined by ...
DOMConfigurator(log4cxx::helpers::Pool &p)
static spi::ConfigurationStatus configure(const wchar_t *filename)
A static version of doConfigure.
Definition domconfigurator.h:240
static spi::ConfigurationStatus configureAndWatch(const std::basic_string< UniChar > &configFilename)
Like configureAndWatch(const File& filename, long delay) except that the default delay as defined by ...
std::map< LogString, AppenderPtr > AppenderMap
Definition domconfigurator.h:78
LayoutPtr parseLayout(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *layout_element)
Used internally to parse a layout element.
void setParameter(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *elem, log4cxx::config::PropertySetter &propSetter)
void parseFilters(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *element, std::vector< log4cxx::spi::FilterPtr > &filters)
Used internally to parse a filter element.
static spi::ConfigurationStatus configure(const File &configFilename)
Read configuration options from configFilename.
static spi::ConfigurationStatus configureAndWatch(const std::string &configFilename)
Like configureAndWatch(const File& filename, long delay) except that the default delay as defined by ...
static spi::ConfigurationStatus configureAndWatch(const std::string &configFilename, long delay)
Read the configuration file configFilename if it exists.
void parseChildrenOfLoggerElement(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *catElement, LoggerPtr logger, bool isRoot, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to parse the children of a logger element.
LogString subst(const LogString &value)
AppenderPtr findAppenderByName(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *elem, apr_xml_doc *doc, const LogString &appenderName, AppenderMap &appenders)
Used internally to parse appenders by IDREF name.
void parseLogger(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *loggerElement, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to parse a logger element.
static spi::ConfigurationStatus configure(const std::string &filename)
A static version of doConfigure.
log4cxx::rolling::RollingPolicyPtr parseRollingPolicy(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *factoryElement)
Used internally to parse the logger factory element.
static LogString getAttribute(log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *, const std::string &attrName)
static spi::ConfigurationStatus configureAndWatch(const std::wstring &configFilename, long delay)
Refer configureAndWatch(const File& filename, long delay)
static spi::ConfigurationStatus configureAndWatch(const std::basic_string< UniChar > &configFilename, long delay)
Refer configureAndWatch(const File& filename, long delay)
void parse(log4cxx::helpers::Pool &p, log4cxx::helpers::CharsetDecoderPtr &utf8Decoder, apr_xml_elem *element, apr_xml_doc *doc, AppenderMap &appenders)
Used internally to configure the log4cxx framework from an in-memory representation of an XML documen...
static spi::ConfigurationStatus configureAndWatch(const std::wstring &configFilename)
Like configureAndWatch(const File& filename, long delay) except that the default delay as defined by ...
const struct __CFString * CFStringRef
Definition logstring.h:30
std::shared_ptr< LoggerRepository > LoggerRepositoryPtr
Definition optionconverter.h:33
ConfigurationStatus
Definition configurator.h:31
Definition domconfigurator.h:48
LOG4CXX_PTR_DEF(DOMConfigurator)
std::basic_string< logchar > LogString
Definition logstring.h:60
std::shared_ptr< Layout > LayoutPtr
Definition appender.h:42
std::shared_ptr< Appender > AppenderPtr
Definition basicconfigurator.h:29
std::shared_ptr< Logger > LoggerPtr
Definition defaultloggerfactory.h:27
#define LOG4CXX_CAST_ENTRY(Interface)
Definition object.h:154
#define END_LOG4CXX_CAST_MAP()
Definition object.h:148
#define DECLARE_LOG4CXX_OBJECT(object)
Definition object.h:41
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:142