PHP Class Phalcon\Logger\Formatter\Firelogger

Inheritance: extends Phalcon\Logger\Formatter, implements Phalcon\Logger\FormatterInterface
Show file Open project: phalcon/incubator

Protected Properties

Property Type Description
$encoding string encoding
$maxPickleDepth integer Maximum recursion for pickle method
$name string Holds name of this logger.
$style string Optional CSS snippet for logger icon in Firelogger console.

Public Methods

Method Description
__construct ( string $name = 'logger' ) Class constructor.
format ( string | integer | float | array | null | Exception $message, integer $type, integer $timestamp, array $context = [], array $trace = null, integer $order ) : mixed Applies a format to a message before sent it to the internal log
getTypeString ( integer $type ) : string Translates Phalcon log types into Firelogger log level strings.
setName ( string $name ) : Firelogger Setter for _name
setStyle ( string $style ) : Firelogger Setter for style

Protected Methods

Method Description
extractFileLine ( array $trace ) : array Extracts useful information from debug_backtrace()
extractTrace ( array $trace ) : array Extract useful information from exception traces.
pickle ( mixed $var, integer $level ) : mixed Reformats the passed log item. Recursive.

Method Details

__construct() public method

Class constructor.
public __construct ( string $name = 'logger' )
$name string

extractFileLine() protected method

Extracts useful information from debug_backtrace()
protected extractFileLine ( array $trace ) : array
$trace array Array returned by debug_backtrace()
return array

extractTrace() protected method

Extract useful information from exception traces.
protected extractTrace ( array $trace ) : array
$trace array
return array

format() public method

Applies a format to a message before sent it to the internal log
public format ( string | integer | float | array | null | Exception $message, integer $type, integer $timestamp, array $context = [], array $trace = null, integer $order ) : mixed
$message string | integer | float | array | null | Exception
$type integer
$timestamp integer
$context array
$trace array This is the output from debug_backtrace().
$order integer How many logs are stored in the stack already.
return mixed

getTypeString() public method

Translates Phalcon log types into Firelogger log level strings.
public getTypeString ( integer $type ) : string
$type integer
return string

pickle() protected method

Reformats the passed log item. Recursive.
protected pickle ( mixed $var, integer $level ) : mixed
$var mixed
$level integer
return mixed

setName() public method

Setter for _name
public setName ( string $name ) : Firelogger
$name string
return Firelogger

setStyle() public method

Setter for style
public setStyle ( string $style ) : Firelogger
$style string
return Firelogger

Property Details

$encoding protected property

encoding
protected string $encoding
return string

$maxPickleDepth protected property

Maximum recursion for pickle method
protected int $maxPickleDepth
return integer

$name protected property

Holds name of this logger.
protected string $name
return string

$style protected property

Optional CSS snippet for logger icon in Firelogger console.
protected string $style
return string