18#ifndef _LOG4CXX_XML_DOM_CONFIGURATOR_H
19#define _LOG4CXX_XML_DOM_CONFIGURATOR_H
35#if LOG4CXX_HAS_DOMCONFIGURATOR
64class LOG4CXX_EXPORT DOMConfigurator :
65 virtual public spi::Configurator
71 typedef std::map<LogString, AppenderPtr> AppenderMap;
76 LOG4CXX_NS::helpers::Pool& p,
77 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
80 const LogString& appenderName,
81 AppenderMap& appenders);
87 LOG4CXX_NS::helpers::Pool& p,
88 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
89 apr_xml_elem* appenderRef,
91 AppenderMap& appenders);
97 LOG4CXX_NS::helpers::Pool& p,
98 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
99 apr_xml_elem* appenderElement,
101 AppenderMap& appenders);
106 void parseErrorHandler(
107 LOG4CXX_NS::helpers::Pool& p,
108 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
109 apr_xml_elem* element,
110 AppenderPtr& appender,
112 AppenderMap& appenders);
118 LOG4CXX_NS::helpers::Pool& p,
119 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
120 apr_xml_elem* element,
121 std::vector<LOG4CXX_NS::spi::FilterPtr>& filters);
127 LOG4CXX_NS::helpers::Pool& p,
128 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
129 apr_xml_elem* loggerElement,
131 AppenderMap& appenders);
136 void parseLoggerFactory(
137 LOG4CXX_NS::helpers::Pool& p,
138 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
139 apr_xml_elem* factoryElement);
144 LOG4CXX_NS::helpers::ObjectPtr parseTriggeringPolicy(
145 LOG4CXX_NS::helpers::Pool& p,
146 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
147 apr_xml_elem* factoryElement);
152 LOG4CXX_NS::rolling::RollingPolicyPtr parseRollingPolicy(
153 LOG4CXX_NS::helpers::Pool& p,
154 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
155 apr_xml_elem* factoryElement);
160 void parseRoot(LOG4CXX_NS::helpers::Pool& p,
161 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
162 apr_xml_elem* rootElement, apr_xml_doc* doc, AppenderMap& appenders);
167 void parseChildrenOfLoggerElement(
168 LOG4CXX_NS::helpers::Pool& p,
169 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
170 apr_xml_elem* catElement,
171 LoggerPtr logger,
bool isRoot,
173 AppenderMap& appenders );
179 LOG4CXX_NS::helpers::Pool& p,
180 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
181 apr_xml_elem* layout_element);
187 LOG4CXX_NS::helpers::Pool& p,
188 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
189 apr_xml_elem* element,
190 LoggerPtr logger,
bool isRoot);
193 LOG4CXX_NS::helpers::Pool& p,
194 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
196 LOG4CXX_NS::config::PropertySetter& propSetter);
203 LOG4CXX_NS::helpers::Pool& p,
204 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
205 apr_xml_elem* element,
207 AppenderMap& appenders);
217 DOMConfigurator(LOG4CXX_NS::helpers::Pool& p);
222 static spi::ConfigurationStatus configure(const std::
string& filename);
223#if LOG4CXX_WCHAR_T_API
227 static spi::ConfigurationStatus configure(
const std::wstring& filename);
229#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
233 static spi::ConfigurationStatus configure(
const std::basic_string<UniChar>& filename);
235#if LOG4CXX_CFSTRING_API
239 static spi::ConfigurationStatus configure(
const CFStringRef& filename);
247 static spi::ConfigurationStatus configureAndWatch(
const std::string& configFilename);
248#if LOG4CXX_WCHAR_T_API
255 static spi::ConfigurationStatus configureAndWatch(
const std::wstring& configFilename);
257#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
264 static spi::ConfigurationStatus configureAndWatch(
const std::basic_string<UniChar>& configFilename);
266#if LOG4CXX_CFSTRING_API
273 static spi::ConfigurationStatus configureAndWatch(
const CFStringRef& configFilename);
290 static spi::ConfigurationStatus configureAndWatch(
const std::string& configFilename,
292#if LOG4CXX_WCHAR_T_API
296 static spi::ConfigurationStatus configureAndWatch(
const std::wstring& configFilename,
299#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR
303 static spi::ConfigurationStatus configureAndWatch(
const std::basic_string<UniChar>& configFilename,
306#if LOG4CXX_CFSTRING_API
310 static spi::ConfigurationStatus configureAndWatch(
const CFStringRef& configFilename,
321 spi::ConfigurationStatus doConfigure(
const File& filename,
322 spi::LoggerRepositoryPtr repository)
override;
326 LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder,
328 const std::string& attrName);
334 DOMConfigurator(
const DOMConfigurator&);
335 DOMConfigurator& operator=(
const DOMConfigurator&);
336 static XMLWatchdog* xdog;
338 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(DOMConfiguratorPrivate, m_priv)
const struct __CFString * CFStringRef
Definition logstring.h:30
std::basic_string< logchar > LogString
Definition logstring.h:60
std::shared_ptr< Layout > LayoutPtr
Definition appender.h:42
LOG4CXX_PTR_DEF(Appender)
std::shared_ptr< Appender > AppenderPtr
Definition basicconfigurator.h:29
#define LOG4CXX_CAST_ENTRY(Interface)
Definition object.h:158
#define END_LOG4CXX_CAST_MAP()
Definition object.h:152
#define DECLARE_LOG4CXX_OBJECT(object)
Definition object.h:43
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:146