\Monolog\HandlerIFTTTHandler

IFTTTHandler uses cURL to trigger IFTTT Maker actions

Register a secret key and trigger/event name at https://ifttt.com/maker

value1 will be the channel from monolog's Logger constructor, value2 will be the level name (ERROR, WARNING, ..) value3 will be the log record's message

Summary

Methods
Properties
Constants
handle()
write()
reset()
pushProcessor()
popProcessor()
setFormatter()
getFormatter()
__construct()
isHandling()
setLevel()
getLevel()
setBubble()
getBubble()
handleBatch()
close()
__destruct()
__sleep()
No public properties found
No constants found
processRecord()
resetProcessors()
getDefaultFormatter()
$processors
$formatter
$level
$bubble
N/A
No private methods found
$eventName
$secretKey
N/A

Properties

$processors

$processors : callable[]

Type

callable[]

$formatter

$formatter : ?\Monolog\Formatter\FormatterInterface

Type

FormatterInterface

$level

$level : int

Type

int

$bubble

$bubble : bool

Type

bool

$eventName

$eventName : string

Type

string

$secretKey

$secretKey : string

Type

string

Methods

handle()

handle(array  $record) : bool

{@inheritDoc}

Parameters

array $record

Returns

bool —

write()

write(array  $record) : void

Writes the record down to the log of the implementing handler

Parameters

array $record

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(string  $eventName, string  $secretKey, mixed  $level = Logger::ERROR, bool  $bubble = true) : mixed

Parameters

string $eventName

The name of the IFTTT Maker event that should be triggered

string $secretKey

A valid IFTTT secret key

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.

handleBatch()

handleBatch(array  $records) : void

Handles a set of records at once.

Parameters

array $records

The records to handle (an array of record arrays)

close()

close() : void

Closes the handler.

__destruct()

__destruct() : mixed

Returns

mixed —

__sleep()

__sleep() : mixed

Returns

mixed —

processRecord()

processRecord(array  $record) : array

Processes a record.

Parameters

array $record

Returns

array —

resetProcessors()

resetProcessors() : void

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 —