Class LoggerXmlLayout

Description

The output of the LoggerXmlLayout consists of a series of log4php:event elements.

Parameters: $locationInfo.

It does not output a complete well-formed XML file. The output is designed to be included as an external entity in a separate file to form a correct XML file.

  • author: Marco Vassura
  • version: $Revision: 556784 $

Located in /layouts/LoggerXmlLayout.php (line 44)

LoggerLayout
   |
   --LoggerXmlLayout
Variable Summary
Method Summary
void activateOptions ()
string format (LoggerLoggingEvent $event)
string getFooter ()
string getHeader ()
boolean getLocationInfo ()
boolean getLog4jNamespace ()
boolean ignoresThrowable ()
void setLocationInfo ( $flag)
void setLog4jNamespace (boolean $flag)
Variables
boolean $locationInfo = true (line 54)

The LocationInfo option takes a boolean value. By default,

it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

boolean $log4jNamespace = false (line 59)
  • var: set the elements namespace
string $_namespace = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS (line 66)
  • var: namespace
  • private:
string $_namespacePrefix = LOG4PHP_LOGGER_XML_LAYOUT_LOG4PHP_NS_PREFIX (line 72)
  • var: namespace prefix
  • private:
Methods
activateOptions (line 77)

No options to activate.

void activateOptions ()

Redefinition of:
LoggerLayout::activateOptions()
Override this method
format (line 106)

Formats a LoggerLoggingEvent in conformance with the log4php.dtd.

string format (LoggerLoggingEvent $event)

Redefinition of:
LoggerLayout::format()
Override this method to create your own layout format.
getFooter (line 146)
string getFooter ()

Redefinition of:
LoggerLayout::getFooter()
Returns the footer for the layout format.
getHeader (line 91)
string getHeader ()

Redefinition of:
LoggerLayout::getHeader()
Returns the header for the layout format.
getLocationInfo (line 155)
boolean getLocationInfo ()
getLog4jNamespace (line 163)
boolean getLog4jNamespace ()
ignoresThrowable (line 173)

The XMLLayout prints and does not ignore exceptions. Hence the return value false.

boolean ignoresThrowable ()
setLocationInfo (line 185)

The $locationInfo option takes a boolean value. By default,

it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

void setLocationInfo ( $flag)
  • $flag
setLog4jNamespace (line 193)
void setLog4jNamespace (boolean $flag)
  • boolean $flag

Inherited Methods

Inherited From LoggerLayout

LoggerLayout::activateOptions()
LoggerLayout::factory()
LoggerLayout::format()
LoggerLayout::getContentType()
LoggerLayout::getFooter()
LoggerLayout::getHeader()

Documentation generated by phpDocumentor 1.3.2