Properties

$processors

$processors : callable[]

Type

callable[]

$formatter

$formatter : ?\Monolog\Formatter\FormatterInterface

Type

FormatterInterface

$level

$level : int

Type

int

$bubble

$bubble : bool

Type

bool

$mailer

$mailer : \Symfony\Component\Mailer\MailerInterface|\Symfony\Component\Mailer\Transport\TransportInterface

Type

TransportInterface

$emailTemplate

$emailTemplate

Methods

handleBatch()

handleBatch(array  $records) : void

Handles a set of records at once.

Parameters

array $records

The records to handle (an array of record arrays)

handle()

handle(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

reset()

reset() : void

pushProcessor()

pushProcessor(callable  $callback) : \Monolog\Handler\HandlerInterface

{@inheritDoc}

Parameters

callable $callback

Returns

\Monolog\Handler\HandlerInterface —

popProcessor()

popProcessor() : callable

{@inheritDoc}

Returns

callable —

setFormatter()

setFormatter(\Monolog\Formatter\FormatterInterface  $formatter) : \Monolog\Handler\HandlerInterface

{@inheritDoc}

Parameters

\Monolog\Formatter\FormatterInterface $formatter

Returns

\Monolog\Handler\HandlerInterface —

getFormatter()

getFormatter() : \Monolog\Formatter\FormatterInterface

{@inheritDoc}

Returns

\Monolog\Formatter\FormatterInterface —

__construct()

__construct(\Symfony\Component\Mailer\MailerInterface|\Symfony\Component\Mailer\Transport\TransportInterface  $mailer, callable|\Symfony\Component\Mime\Email  $email, mixed  $level = Logger::ERROR, bool  $bubble = true) : mixed

Parameters

\Symfony\Component\Mailer\MailerInterface|\Symfony\Component\Mailer\Transport\TransportInterface $mailer

The mailer to use

callable|\Symfony\Component\Mime\Email $email

An email template, the subject/body will be replaced

mixed $level
bool $bubble

Returns

mixed —

isHandling()

isHandling(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

setLevel()

setLevel(mixed  $level) : self

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

Parameters

mixed $level

Returns

self —

getLevel()

getLevel() : int

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

Returns

int —

setBubble()

setBubble(bool  $bubble) : self

Sets the bubbling behavior.

Parameters

bool $bubble

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

Returns

self —

getBubble()

getBubble() : bool

Gets the bubbling behavior.

Returns

bool —

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

close()

close() : void

Closes the handler.

__destruct()

__destruct() : mixed

Returns

mixed —

__sleep()

__sleep() : mixed

Returns

mixed —

send()

send(string  $content, array  $records) : void

Send a mail with the given content

Parameters

string $content

formatted email body to be sent

array $records

the array of log records that formed this content

write()

write(array  $record) : void

Writes the record down to the log of the implementing handler

Parameters

array $record

getHighestRecord()

getHighestRecord(array  $records) : array

Parameters

array $records

Returns

array —

isHtmlBody()

isHtmlBody(string  $body) : bool

Parameters

string $body

Returns

bool —

getDefaultFormatter()

getDefaultFormatter() : \Monolog\Formatter\FormatterInterface

Gets the default formatter.

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

Returns

\Monolog\Formatter\FormatterInterface —

processRecord()

processRecord(array  $record) : array

Processes a record.

Parameters

array $record

Returns

array —

resetProcessors()

resetProcessors() : void

getSubjectFormatter()

getSubjectFormatter(string|null  $format) : \Monolog\Formatter\FormatterInterface

Gets the formatter for the Swift_Message subject.

Parameters

string|null $format

The format of the subject

Returns

\Monolog\Formatter\FormatterInterface —

buildMessage()

buildMessage(string  $content, array  $records) : \Symfony\Component\Mime\Email

Creates instance of Email to be sent

Parameters

string $content

formatted email body to be sent

array $records

Log records that formed the content

Returns

\Symfony\Component\Mime\Email —