Class LoggerAppender

Description

Abstract class that defines output logs strategies.

  • version: $Revision: 822392 $
  • abstract:

Located in /LoggerAppender.php (line 27)


	
			
Direct descendents
Class Description
LoggerAppenderAdodb Appends log events to a db table using adodb class.
LoggerAppenderConsole ConsoleAppender appends log events to STDOUT or STDERR.
LoggerAppenderEcho LoggerAppenderEcho uses echo function to output events.
LoggerAppenderFile FileAppender appends log events to a file.
LoggerAppenderMail Appends log events to mail using php function http://www.php.net/mail.
LoggerAppenderMailEvent Log every events as a separate email.
LoggerAppenderNull A NullAppender merely exists, it never outputs a message to any device.
LoggerAppenderPDO Appends log events to a db table using PDO.
LoggerAppenderPhp Log events using php http://www.php.net/trigger_error function and a LoggerLayoutTTCC default layout.
LoggerAppenderSocket Serialize events and send them to a network socket.
LoggerAppenderSyslog Log events using php http://www.php.net/syslog function.
Variable Summary
Method Summary
LoggerAppender __construct ([string $name = ''])
void activateOptions ()
void addFilter (LoggerFilter $newFilter)
void append (LoggerLoggingEvent $event)
void clearFilters ()
void close ()
void doAppend (LoggerLoggingEvent $event)
string getName ()
boolean requiresLayout ()
void setLayout (LoggerLayout $layout)
void setName (string $name)
void setThreshold (mixed $threshold)
Variables
boolean $closed = false (line 32)
  • var: closed appender flag
  • access: protected
LoggerFilter $filter = null (line 38)

The first filter in the filter chain

  • access: protected
LoggerLayout $layout = null (line 44)

LoggerLayout for this appender. It can be null if appender has its own layout

  • access: protected
string $name (line 49)
  • var: Appender name
  • access: protected
boolean $requiresLayout = false (line 59)
  • var: needs a layout formatting ?
  • access: protected

Redefined in descendants as:
LoggerLevel $threshold = null (line 54)
  • var: There is no level threshold filtering by default.
  • access: protected
Methods
Constructor __construct (line 66)

Constructor

  • access: public
LoggerAppender __construct ([string $name = ''])
  • string $name: appender name

Redefined in descendants as:
activateOptions (line 242)

Derived appenders should override this method if option structure requires it.

  • abstract:
  • access: public
void activateOptions ()

Redefined in descendants as:
addFilter (line 75)

Add a filter to the end of the filter list.

  • access: public
void addFilter (LoggerFilter $newFilter)
clearFilters (line 87)

Clear the list of filters by removing all the filters in it.

  • abstract:
  • access: public
void clearFilters ()
close (line 260)

Release any resources allocated.

Subclasses of LoggerAppender should implement this method to perform proper closing procedures.

  • abstract:
  • access: public
void close ()

Redefined in descendants as:
doAppend (line 117)

This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific append() method.

void doAppend (LoggerLoggingEvent $event)
getFilter (line 97)

Return the first filter in the filter chain for this Appender.

The return value may be null if no is filter is set.

  • access: public
LoggerFilter getFilter ()
getFirstFilter (line 106)

Return the first filter in the filter chain for this Appender.

The return value may be null if no is filter is set.

  • access: public
LoggerFilter getFirstFilter ()
getLayout (line 153)

Returns this appender layout.

LoggerLayout getLayout ()
getName (line 184)

Get the name of this appender.

string getName ()
getThreshold (line 205)

Returns this appenders threshold level.

See the setThreshold() method for the meaning of this option.

  • access: public
LoggerLevel getThreshold ()
isAsSevereAsThreshold (line 231)

Check whether the message level is below the appender's threshold.

If there is no threshold set, then the return value is always true.

  • return: true if priority is greater or equal than threshold
  • access: public
boolean isAsSevereAsThreshold (LoggerLevel $level)
requiresLayout (line 175)

Configurators call this method to determine if the appender requires a layout.

If this method returns true, meaning that layout is required, then the configurator will configure a layout using the configuration information at its disposal. If this method returns false, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator.

In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return true.

boolean requiresLayout ()
setLayout (line 142)

Set the Layout for this appender.

void setLayout (LoggerLayout $layout)
setName (line 196)

Set the name of this appender.

The name is used by other components to identify this appender.

  • access: public
void setName (string $name)
  • string $name
setThreshold (line 215)

Set the threshold level of this appender.

void setThreshold (mixed $threshold)
  • mixed $threshold: can be a LoggerLevel object or a string.

Documentation generated on Fri, 27 Nov 2009 07:44:46 +0100 by phpDocumentor 1.4.3