ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Sends notifications through Slack Webhooks. More...
Public Member Functions | ||||
__construct ($webhookUrl, $channel=null, $username=null, $useAttachment=true, $iconEmoji=null, $useShortAttachment=false, $includeContextAndExtra=false, $level=Logger::CRITICAL, $bubble=true, array $excludeFields=array()) | ||||
getSlackRecord () | ||||
getWebhookUrl () | ||||
setFormatter (FormatterInterface $formatter) | ||||
Sets the formatter. More... | ||||
getFormatter () | ||||
Gets the formatter. More... | ||||
Public Member Functions inherited from Monolog\Handler\AbstractProcessingHandler | ||||
handle (array $record) | ||||
{Handles a record.All records may be passed to this method, and the handler should discard those that it does not want to handle.The return value of this function controls the bubbling process of the handler stack. Unless the bubbling is interrupted (by returning true), the Logger class will keep on calling further handlers in the stack with a given log record.
| ||||
Public Member Functions inherited from Monolog\Handler\AbstractHandler | ||||
__construct ($level=Logger::DEBUG, $bubble=true) | ||||
isHandling (array $record) | ||||
{Checks whether the given record will be handled by this handler.This is mostly done for performance reasons, to avoid calling processors for nothing.Handlers should still check the record levels within handle(), returning false in isHandling() is no guarantee that handle() will not be called, and isHandling() might not be called for a given record.
| ||||
handleBatch (array $records) | ||||
{Handles a set of records at once.
| ||||
close () | ||||
Closes the handler. More... | ||||
pushProcessor ($callback) | ||||
{Adds a processor in the stack.
| ||||
popProcessor () | ||||
{Removes the processor on top of the stack and returns it.
| ||||
setFormatter (FormatterInterface $formatter) | ||||
{Sets the formatter.
| ||||
getFormatter () | ||||
{Gets the formatter.
| ||||
setLevel ($level) | ||||
Sets minimum logging level at which this handler will be triggered. More... | ||||
getLevel () | ||||
Gets minimum logging level at which this handler will be triggered. More... | ||||
setBubble ($bubble) | ||||
Sets the bubbling behavior. More... | ||||
getBubble () | ||||
Gets the bubbling behavior. More... | ||||
__destruct () | ||||
reset () | ||||
Protected Member Functions | |
write (array $record) | |
{} More... | |
Protected Member Functions inherited from Monolog\Handler\AbstractProcessingHandler | |
write (array $record) | |
Writes the record down to the log of the implementing handler. More... | |
processRecord (array $record) | |
Processes a record. More... | |
Protected Member Functions inherited from Monolog\Handler\AbstractHandler | |
getDefaultFormatter () | |
Gets the default formatter. More... | |
Private Attributes | |
$webhookUrl | |
$slackRecord | |
Additional Inherited Members | |
Protected Attributes inherited from Monolog\Handler\AbstractHandler | |
$level = Logger::DEBUG | |
$bubble = true | |
$formatter | |
$processors = array() | |
Sends notifications through Slack Webhooks.
Definition at line 24 of file SlackWebhookHandler.php.
Monolog\Handler\SlackWebhookHandler::__construct | ( | $webhookUrl, | |
$channel = null , |
|||
$username = null , |
|||
$useAttachment = true , |
|||
$iconEmoji = null , |
|||
$useShortAttachment = false , |
|||
$includeContextAndExtra = false , |
|||
$level = Logger::CRITICAL , |
|||
$bubble = true , |
|||
array | $excludeFields = array() |
||
) |
string | $webhookUrl | Slack Webhook URL |
string | null | $channel | Slack channel (encoded ID or name) |
string | null | $username | Name of a bot |
bool | $useAttachment | Whether the message should be added to Slack as attachment (plain text otherwise) |
string | null | $iconEmoji | The emoji name to use (or null) |
bool | $useShortAttachment | Whether the the context/extra messages added to Slack as attachments are in a short style |
bool | $includeContextAndExtra | Whether the attachment should include context and extra data |
int | $level | The minimum logging level at which this handler will be triggered |
bool | $bubble | Whether the messages that are handled can bubble up the stack or not |
array | $excludeFields | Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] |
Definition at line 50 of file SlackWebhookHandler.php.
References Monolog\Handler\AbstractHandler\$bubble, Monolog\Handler\AbstractHandler\$level, and Monolog\Handler\SlackWebhookHandler\$webhookUrl.
Monolog\Handler\SlackWebhookHandler::getFormatter | ( | ) |
Gets the formatter.
Implements Monolog\Handler\HandlerInterface.
Definition at line 113 of file SlackWebhookHandler.php.
References Monolog\Handler\AbstractHandler\$formatter.
Monolog\Handler\SlackWebhookHandler::getSlackRecord | ( | ) |
Definition at line 68 of file SlackWebhookHandler.php.
References Monolog\Handler\SlackWebhookHandler\$slackRecord.
Monolog\Handler\SlackWebhookHandler::getWebhookUrl | ( | ) |
Definition at line 73 of file SlackWebhookHandler.php.
References Monolog\Handler\SlackWebhookHandler\$webhookUrl.
Monolog\Handler\SlackWebhookHandler::setFormatter | ( | FormatterInterface | $formatter | ) |
Sets the formatter.
FormatterInterface | $formatter |
Implements Monolog\Handler\HandlerInterface.
Definition at line 105 of file SlackWebhookHandler.php.
|
protected |
{}
array | $record |
Definition at line 83 of file SlackWebhookHandler.php.
References PHPMailer\PHPMailer\$options, $postData, and Monolog\Handler\Curl\Util\execute().
|
private |
Definition at line 36 of file SlackWebhookHandler.php.
Referenced by Monolog\Handler\SlackWebhookHandler\getSlackRecord().
|
private |
Definition at line 30 of file SlackWebhookHandler.php.
Referenced by Monolog\Handler\SlackWebhookHandler\__construct(), and Monolog\Handler\SlackWebhookHandler\getWebhookUrl().