Plop
A simple logging library for PHP
Plop\Handler\Stream Class Reference

An handler that writes log messages to a PHP stream. More...

+ Inheritance diagram for Plop\Handler\Stream:

Public Member Functions

 __construct ($stream=null)
 
- Public Member Functions inherited from Plop\HandlerAbstract
 __construct (\Plop\FormatterInterface $formatter=null,\Plop\FiltersCollectionAbstract $filters=null)
 
 getFilters ()
 
 getFormatter ()
 
 handle (\Plop\RecordInterface $record)
 
 handleError (\Plop\RecordInterface $record,\Exception $exception)
 
 setFilters (\Plop\FiltersCollectionAbstract $filters)
 
 setFormatter (\Plop\FormatterInterface $formatter)
 

Protected Member Functions

 emit (\Plop\RecordInterface $record)
 
 flush ()
 
- Protected Member Functions inherited from Plop\HandlerAbstract
 emit (\Plop\RecordInterface $record)
 
 format (\Plop\RecordInterface $record)
 
 getStderr ()
 

Protected Attributes

 $stream
 The stream where log messages will be write to.
 
- Protected Attributes inherited from Plop\HandlerAbstract
 $filters
 An object handling a collection of filters.
 
 $formatter
 Formatter object to use for this handler.
 

Static Protected Attributes

static $stderr = null
 A stream referencing STDERR.
 

Detailed Description

An handler that writes log messages to a PHP stream.

See also
http://php.net/streams

Definition at line 31 of file Stream.php.

Constructor & Destructor Documentation

Plop\Handler\Stream::__construct (   $stream = null)

Create a new instance of this handler.

Parameters
resource$stream(optional) The stream where log messages will be written. Defaults to STDERR.

Definition at line 46 of file Stream.php.

References Plop\Handler\Stream\$stream.

Member Function Documentation

Plop\Handler\Stream::emit ( \Plop\RecordInterface  $record)
protected

Definition at line 73 of file Stream.php.

References Plop\Handler\Stream\flush(), and Plop\HandlerAbstract\format().

Plop\Handler\Stream::flush ( )
protected

Flush the stream's buffers.

Returns
This method does not return any value.

Definition at line 65 of file Stream.php.

Referenced by Plop\Handler\File\close(), and Plop\Handler\Stream\emit().


The documentation for this class was generated from the following file: