PHP Class Phalcon\Logger\Adapter\Firelogger

Author: Richard Laffers ([email protected])
Inheritance: extends Phalcon\Logger\Adapter, implements Phalcon\Logger\AdapterInterface
Afficher le fichier Open project: phalcon/incubator

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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

Méthodes protégées

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

Private Methods

Méthode 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 méthode

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

begin() public méthode

public begin ( )

checkPassword() protected méthode

Disables/enables the firelogger appropriately.
protected checkPassword ( ) : boolean
Résultat boolean

close() public méthode

public close ( ) : boolean
Résultat boolean

commit() public méthode

{@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 méthode

protected flush ( )

getFormatter() public méthode

public getFormatter ( ) : Phalcon\Logger\FormatterInterface
Résultat Phalcon\Logger\FormatterInterface

logInternal() public méthode

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 méthode

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

Property Details

$clientVersion protected_oe property

Holds detected Firelogger client version.
protected string $clientVersion
Résultat string

$enabled protected_oe property

protected bool $enabled
Résultat boolean

$isTransaction protected_oe property

Denotes if there is a transaction started.
protected bool $isTransaction
Résultat boolean

$logs protected_oe property

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

$name protected_oe property

Name
protected string $name
Résultat 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
Résultat array

$recommendedClientVersion protected_oe property

Recommended Firelogger client version.
protected string $recommendedClientVersion
Résultat string

$serverVersion protected_oe property

Holds current Firelogger server version.
protected string $serverVersion
Résultat string