Class LoggerDOMConfigurator

Description

Implements interfaces:

Use this class to initialize the log4php environment using expat parser.

Read the log4php.dtd included in the documentation directory. Note that php parser does not validate the document.

Sometimes it is useful to see how log4php is reading configuration files. You can enable log4php internal logging by setting the debug attribute in the log4php:configuration element. As in

 <log4php:configuration debug="true" xmlns:log4php="http://logging.apache.org/log4php/">
 ...
 </log4php:configuration>

There are sample XML files included in the package under tests/ subdirectories.

Located in /xml/LoggerDOMConfigurator.php (line 79)


	
			
Variable Summary
Method Summary
static void configure ([string $url = ''])
LoggerDOMConfigurator LoggerDOMConfigurator ()
void doConfigure ([string $url = ''], LoggerHierarchy &$repository)
void doConfigureByString (string $xmlData, LoggerHierarchy &$repository)
void doConfigureDefault (LoggerHierarchy &$repository)
void parse (string $xmlData,  &$repository)
void setter ( &$object, string $name, mixed $value, object $object)
void subst ( $value)
void tagClose (mixed $parser, string $tag)
void tagOpen (mixed $parser, string $tag, array $attribs)
Variables
LoggerAppender $appender (line 99)
  • var: parsed LoggerAppender
LoggerFilter $filter (line 104)
  • var: parsed LoggerFilter
LoggerLayout $layout (line 109)
  • var: parsed LoggerLayout
Logger $logger (line 94)
  • var: parsed Logger
LoggerHierarchy $repository (line 84)
array $state (line 89)
  • var: state stack
Methods
static method configure (line 132)

Configure the default repository using the resource pointed by url.

Url is any valid resource as defined in http://www.php.net/file function. Note that the resource will be search with use_include_path parameter set to "1".

  • access: public
static void configure ([string $url = ''])
  • string $url

Implementation of:
LoggerConfigurator::configure()
Interpret a resource pointed by a url and configure accordingly.
Constructor LoggerDOMConfigurator (line 114)

Constructor

LoggerDOMConfigurator LoggerDOMConfigurator ()
doConfigure (line 147)

Configure the given repository using the resource pointed by url.

Url is any valid resurce as defined in http://www.php.net/file function. Note that the resource will be search with use_include_path parameter set to "1".

void doConfigure ([string $url = ''], LoggerHierarchy &$repository)
doConfigureByString (line 161)

Configure the given repository using the configuration written in xmlData.

Do not call this method directly. Use doConfigure() instead.

void doConfigureByString (string $xmlData, LoggerHierarchy &$repository)
doConfigureDefault (line 169)
void doConfigureDefault (LoggerHierarchy &$repository)
parse (line 177)
void parse (string $xmlData,  &$repository)
  • string $xmlData
  • &$repository
setter (line 580)
void setter ( &$object, string $name, mixed $value, object $object)
  • object $object
  • string $name
  • mixed $value
  • &$object
subst (line 596)
void subst ( $value)
  • $value
tagClose (line 501)
void tagClose (mixed $parser, string $tag)
  • mixed $parser
  • string $tag
tagOpen (line 210)
  • todo: In 'LOGGER' case find a better way to detect 'getLogger()' method
void tagOpen (mixed $parser, string $tag, array $attribs)
  • mixed $parser
  • string $tag
  • array $attribs

Documentation generated by phpDocumentor 1.3.2