PHP Class Logger\Handler

Handles a log message
Show file Open project: prggmr/xpspl

Protected Properties

Property Type Description
$_formatter object The message formatter
$_level Level to handle log messages.
$_output resource Output file.

Public Methods

Method Description
__construct ( Formatter $formatter, resource $output, integer $level = LOGGER_LOG_LEVEL ) : void Sets the formatter.
handle ( integer $code, string $message ) : void Handles a message.

Protected Methods

Method Description
_make_writeable ( ) : boolean Makes the output writeable.

Method Details

__construct() public method

Sets the formatter.
public __construct ( Formatter $formatter, resource $output, integer $level = LOGGER_LOG_LEVEL ) : void
$formatter Formatter
$output resource Output resource or file
$level integer Code level to log, anything greater than the given code will be logged.
return void

_make_writeable() protected method

This will create a non-blocking stream to the given file.
protected _make_writeable ( ) : boolean
return boolean

handle() public method

Handles a message.
public handle ( integer $code, string $message ) : void
$code integer Log level code.
$message string Message to handle.
return void

Property Details

$_formatter protected property

The message formatter
protected object $_formatter
return object

$_level protected property

Level to handle log messages.
protected $_level

$_output protected property

Output file.
protected resource $_output
return resource