Constants

VERSION

VERSION = '4.1.0' : string

HEADER_NAME

HEADER_NAME = 'X-ChromeLogger-Data' : string

BACKTRACE_LEVEL

BACKTRACE_LEVEL = 'backtrace_level' : string

LOG

LOG = 'log' : string

WARN

WARN = 'warn' : string

ERROR

ERROR = 'error' : string

GROUP

GROUP = 'group' : string

INFO

INFO = 'info' : string

GROUP_END

GROUP_END = 'groupEnd' : string

GROUP_COLLAPSED

GROUP_COLLAPSED = 'groupCollapsed' : string

TABLE

TABLE = 'table' : string

Properties

$_php_version

$_php_version : string

Type

string

$_timestamp

$_timestamp : integer

Type

integer

$_json

$_json : array

Type

array

$_backtraces

$_backtraces : array

Type

array

$_error_triggered

$_error_triggered : boolean

Type

boolean

$_settings

$_settings : array

Type

array

$_processed

$_processed : array

Prevent recursion when working with objects referring to each other

Type

array

Methods

getInstance()

getInstance() : \Behavior\ChromePhp

gets instance of this class

Returns

\Behavior\ChromePhp

log()

log() : void

logs a variable to the console

warn()

warn() : void

logs a warning to the console

error()

error() : void

logs an error to the console

group()

group() 

sends a group log

info()

info() : void

sends an info log

groupCollapsed()

groupCollapsed() 

sends a collapsed group log

groupEnd()

groupEnd() 

ends a group log

table()

table() 

sends a table log

addSetting()

addSetting(  $key,   $value) : void

adds a setting

Parameters

$key
$value

addSettings()

addSettings(array  $settings) : void

add ability to set multiple settings in one call

Parameters

array $settings

getSetting()

getSetting(  $key) : mixed

gets a setting

Parameters

$key

Returns

mixed

_log()

_log(string  $type, array  $args) : void

internal logging call

Parameters

string $type
array $args

_convert()

_convert(  $object) : array

converts an object to a better format for logging

Parameters

$object

Returns

array

_getPropertyKey()

_getPropertyKey(\Behavior\ReflectionProperty  $property) : string

takes a reflection property and returns a nicely formatted key of the property name

Parameters

\Behavior\ReflectionProperty $property

Returns

string

_addRow()

_addRow(array  $logs,   $backtrace,   $type) : void

adds a value to the data array

Parameters

array $logs
$backtrace
$type

_writeHeader()

_writeHeader(  $data) 

Parameters

$data

_encode()

_encode(array  $data) : string

encodes the data to be sent along with the request

Parameters

array $data

Returns

string

__construct()

__construct() 

constructor