Properties

$processors

$processors : array<mixed,callable>

Type

array<mixed,callable>

$formatter

$formatter : \Monolog\Handler\?FormatterInterface

Type

\Monolog\Handler\?FormatterInterface

$level

$level : 

Type

$bubble

$bubble : 

Type

$initialized

$initialized : 

Type

$records

$records : 

Type

Methods

handle()

handle(array  $record) 

{@inheritdoc}

Parameters

array $record

reset()

reset() : void

pushProcessor()

pushProcessor(callable  $callback) 

{@inheritdoc}

Parameters

callable $callback

popProcessor()

popProcessor() 

{@inheritdoc}

getFormatter()

getFormatter() 

{@inheritdoc}

__construct()

__construct(integer|string  $level = \Monolog\Logger::DEBUG, boolean  $bubble = true) 

Parameters

integer|string $level

The minimum logging level at which this handler will be triggered

boolean $bubble

Whether the messages that are handled can bubble up the stack or not

isHandling()

isHandling(array  $record) 

{@inheritdoc}

Parameters

array $record

setLevel()

setLevel(integer|string  $level) : self

Sets minimum logging level at which this handler will be triggered.

Parameters

integer|string $level

Level or level name

Returns

self

getLevel()

getLevel() : integer

Gets minimum logging level at which this handler will be triggered.

Returns

integer

setBubble()

setBubble(boolean  $bubble) : self

Sets the bubbling behavior.

Parameters

boolean $bubble

true means that this handler allows bubbling. false means that bubbling is not permitted.

Returns

self

getBubble()

getBubble() : boolean

Gets the bubbling behavior.

Returns

boolean —

true means that this handler allows bubbling. false means that bubbling is not permitted.

handleBatch()

handleBatch(array  $records) 

Handles a set of records at once.

Parameters

array $records

The records to handle (an array of record arrays)

close()

close() 

__destruct()

__destruct() 

__sleep()

__sleep() 

send()

send() 

Convert records to javascript console commands and send it to the browser.

This method is automatically called on PHP shutdown if output is HTML or Javascript.

resetStatic()

resetStatic() 

Forget all logged records

write()

write(array  $record) 

Writes the record down to the log of the implementing handler

Parameters

array $record

processRecord()

processRecord(array  $record) 

Processes a record.

Parameters

array $record

resetProcessors()

resetProcessors() 

getDefaultFormatter()

getDefaultFormatter() 

{@inheritDoc}

Formatted output may contain some formatting markers to be transferred to console.log using the %c format.

Example of formatted string:

You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white}

registerShutdownFunction()

registerShutdownFunction() 

Wrapper for register_shutdown_function to allow overriding

writeOutput()

writeOutput(\Monolog\Handler\string  $str) 

Wrapper for echo to allow overriding

Parameters

\Monolog\Handler\string $str

getResponseFormat()

getResponseFormat() : string

Checks the format of the response

If Content-Type is set to application/javascript or text/javascript -> js If Content-Type is set to text/html, or is unset -> html If Content-Type is anything else -> unknown

Returns

string —

One of 'js', 'html' or 'unknown'

generateScript()

generateScript() 

handleStyles()

handleStyles(\Monolog\Handler\string  $formatted) 

Parameters

\Monolog\Handler\string $formatted

handleCustomStyles()

handleCustomStyles(\Monolog\Handler\string  $style, \Monolog\Handler\string  $string) 

Parameters

\Monolog\Handler\string $style
\Monolog\Handler\string $string

dump()

dump(\Monolog\Handler\string  $title, array  $dict) 

Parameters

\Monolog\Handler\string $title
array $dict

quote()

quote(\Monolog\Handler\string  $arg) 

Parameters

\Monolog\Handler\string $arg

call()

call(  $args) 

Parameters

$args

call_array()

call_array(\Monolog\Handler\string  $method, array  $args) 

Parameters

\Monolog\Handler\string $method
array $args