PHP Class Phalcon\Logger\Adapter\Firelogger

Author: Richard Laffers ([email protected])
Inheritance: extends Phalcon\Logger\Adapter, implements Phalcon\Logger\AdapterInterface
ファイルを表示 Open project: phalcon/incubator

Protected Properties

Property Type Description
$clientVersion string Holds detected Firelogger client version.
$enabled boolean
$isTransaction boolean Denotes if there is a transaction started.
$logs array Storage for holding all messages until they are ready to be shipped to client.
$name string Name
$options array Leave empty if no password authentication is needed. (boolean) checkVersion Turn client version checks on / off. (boolean) traceable If TRUE, backtraces will be added to all logs.
$recommendedClientVersion string Recommended Firelogger client version.
$serverVersion string Holds current Firelogger server version.

Public Methods

Method Description
__construct ( string $name = 'phalcon', array $options = [] ) Class constructor.
begin ( )
close ( ) : boolean
commit ( ) {@inheritdoc} Encodes all collected messages into HTTP headers. This method is registered as a shutdown handler, so transactions will get committed even if you forget to commit them yourself.
getFormatter ( ) : Phalcon\Logger\FormatterInterface
logInternal ( mixed $message, integer $type, integer $time, array $context = [] ) Writes the log to the headers.
setName ( string $name ) Setter for name

Protected Methods

Method Description
checkPassword ( ) : boolean Checks client provided password to see if we should disable/enable the firelogger.
flush ( )

Private Methods

Method Description
checkVersion ( ) : boolean Checks client version vs recommended version and logs a message if there is a mismatch. Does not disable firelogger even if there is version mismatch.

Method Details

__construct() public method

Class constructor.
public __construct ( string $name = 'phalcon', array $options = [] )
$name string
$options array

begin() public method

public begin ( )

checkPassword() protected method

Disables/enables the firelogger appropriately.
protected checkPassword ( ) : boolean
return boolean

close() public method

public close ( ) : boolean
return boolean

commit() public method

{@inheritdoc} Encodes all collected messages into HTTP headers. This method is registered as a shutdown handler, so transactions will get committed even if you forget to commit them yourself.
public commit ( )

flush() protected method

protected flush ( )

getFormatter() public method

public getFormatter ( ) : Phalcon\Logger\FormatterInterface
return Phalcon\Logger\FormatterInterface

logInternal() public method

Writes the log to the headers.
public logInternal ( mixed $message, integer $type, integer $time, array $context = [] )
$message mixed Stuff to log. Can be of any type castable into a string (i.e. anything except for objects without __toString() implementation).
$type integer
$time integer
$context array

setName() public method

Setter for name
public setName ( string $name )
$name string

Property Details

$clientVersion protected_oe property

Holds detected Firelogger client version.
protected string $clientVersion
return string

$enabled protected_oe property

protected bool $enabled
return boolean

$isTransaction protected_oe property

Denotes if there is a transaction started.
protected bool $isTransaction
return boolean

$logs protected_oe property

Storage for holding all messages until they are ready to be shipped to client.
protected array $logs
return array

$name protected_oe property

Name
protected string $name
return string

$options protected_oe property

Leave empty if no password authentication is needed. (boolean) checkVersion Turn client version checks on / off. (boolean) traceable If TRUE, backtraces will be added to all logs.
protected array $options
return array

$recommendedClientVersion protected_oe property

Recommended Firelogger client version.
protected string $recommendedClientVersion
return string

$serverVersion protected_oe property

Holds current Firelogger server version.
protected string $serverVersion
return string