Methods summary
public
|
#
__construct( string $name = '' )
Default constructor.
Parameters
- $name
string $name Appender name
|
public
|
|
public
LoggerLayout
|
#
getDefaultLayout( )
Returns the default layout for this appender. Can be overriden by derived
appenders.
Returns the default layout for this appender. Can be overriden by derived
appenders.
Returns
|
public
|
#
addFilter( LoggerFilter $filter )
Adds a filter to the end of the filter chain.
Adds a filter to the end of the filter chain.
Parameters
|
public
|
#
clearFilters( )
Clears the filter chain by removing all the filters in it.
Clears the filter chain by removing all the filters in it.
|
public
LoggerFilter
|
#
getFilter( )
Returns the first filter in the filter chain. The return value may be
null if no is filter is set.
Returns the first filter in the filter chain. The return value may be
null if no is filter is set.
Returns
|
public
LoggerFilter
|
#
getFirstFilter( )
Returns the first filter in the filter chain. The return value may be
null if no is filter is set.
Returns the first filter in the filter chain. The return value may be
null if no is filter is set.
Returns
|
public
|
#
doAppend( LoggerLoggingEvent $event )
Performs threshold checks and invokes filters before delegating logging to
the subclass' specific append() method.
Performs threshold checks and invokes filters before delegating logging to
the subclass' specific append() method.
Parameters
See
|
public
|
|
public
LoggerLayout
|
#
getLayout( )
Returns the appender layout.
Returns the appender layout.
Returns
|
public
boolean
|
#
requiresLayout( )
Configurators call this method to determine if the appender requires a
layout.
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.
Returns
boolean
|
public
string
|
#
getName( )
Retruns the appender name.
Retruns the appender name.
Returns
string
|
public
|
#
setName( string $name )
Sets the appender name.
Parameters
|
public
LoggerLevel
|
#
getThreshold( )
Returns the appender's threshold level.
Returns the appender's threshold level.
Returns
|
public
|
#
setThreshold( LoggerLevel |string $threshold )
Sets the appender threshold.
Sets the appender threshold.
Parameters
See
LoggerOptionConverter::toLevel()
|
public
boolean
|
#
isAsSevereAsThreshold( LoggerLevel $level )
Checks whether the message level is below the appender's threshold.
Checks whether the message level is below the appender's threshold.
If there is no threshold set, then the return value is always
true.
Parameters
Returns
boolean Returns true if level is greater or equal than threshold, or if the threshold is
not set. Otherwise returns false.
|
public
|
#
activateOptions( )
Prepares the appender for logging.
Prepares the appender for logging.
Derived appenders should override this method if option structure requires
it.
|
abstract protected
|
#
append( LoggerLoggingEvent $event )
Forwards the logging event to the destination.
Forwards the logging event to the destination.
Derived appenders should implement this method to perform actual logging.
Parameters
|
public
|
#
close( )
Releases any resources allocated by the appender.
Releases any resources allocated by the appender.
Derived appenders should override this method to perform proper closing
procedures.
|
protected
|
#
warn( mixed $message )
Triggers a warning for this logger with the given message.
Triggers a warning for this logger with the given message.
Overrides
|
Properties summary
protected
boolean
|
$closed
|
false |
#
Set to true when the appender is closed. A closed appender will not accept
any logging requests.
Set to true when the appender is closed. A closed appender will not accept
any logging requests.
|
protected
LoggerFilter
|
$filter
|
|
#
The first filter in the filter chain.
The first filter in the filter chain.
|
protected
LoggerLayout
|
$layout
|
|
#
The appender's layout. Can be null if the appender does not use a layout.
The appender's layout. Can be null if the appender does not use a layout.
|
protected
string
|
$name
|
|
#
Appender name. Used by other components to identify this appender.
Appender name. Used by other components to identify this appender.
|
protected
LoggerLevel
|
$threshold
|
|
#
Appender threshold level. Events whose level is below the threshold will not
be logged.
Appender threshold level. Events whose level is below the threshold will not
be logged.
|
protected
boolean
|
$requiresLayout
|
true |
#
Set to true if the appender requires a layout.
Set to true if the appender requires a layout.
True by default, appenders which do not use a layout should override this
property to false.
|