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

$udpConnection

$udpConnection : 

Type

$httpConnection

$httpConnection : 

Type

$scheme

$scheme : 

Type

$host

$host : 

Type

$port

$port : 

Type

$acceptedSchemes

$acceptedSchemes : 

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(\Monolog\Handler\string  $url,   $level = \Monolog\Logger::DEBUG, \Monolog\Handler\bool  $bubble = true) 

Create a Cube handler

Parameters

\Monolog\Handler\string $url
$level
\Monolog\Handler\bool $bubble

Throws

\UnexpectedValueException

when given url is not a valid url. A valid url must consist of three parts : protocol://host:port Only valid protocols used by Cube are http and udp

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() 

Closes the handler.

Ends a log cycle and frees all resources used by the handler.

Closing a Handler means flushing all buffers and freeing any open resources/handles.

Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) and ideally handlers should be able to reopen themselves on handle() after they have been closed.

This is useful at the end of a request and will be called automatically when the object is destroyed if you extend Monolog\Handler\Handler.

If you are thinking of calling this method yourself, most likely you should be calling ResettableInterface::reset instead. Have a look.

__destruct()

__destruct() 

__sleep()

__sleep() 

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() 

Gets the default formatter.

Overwrite this if the LineFormatter is not a good default for your handler.

connectUdp()

connectUdp() 

Establish a connection to an UDP socket

Throws

\LogicException

when unable to connect to the socket

\Monolog\Handler\MissingExtensionException

when there is no socket extension

connectHttp()

connectHttp() 

Establish a connection to an http server

Throws

\LogicException

when unable to connect to the socket

\Monolog\Handler\MissingExtensionException

when no curl extension

writeUdp()

writeUdp(\Monolog\Handler\string  $data) 

Parameters

\Monolog\Handler\string $data

writeHttp()

writeHttp(\Monolog\Handler\string  $data) 

Parameters

\Monolog\Handler\string $data