1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00
This commit is contained in:
Jordi Boggiano
2017-03-20 10:56:47 +01:00
parent 9a11094c66
commit 7405bb5d67
20 changed files with 85 additions and 84 deletions

View File

@@ -3,7 +3,7 @@
/*
* This file is part of the Monolog package.
*
* (c) Roel Harbers <roelharbers@gmail.com>
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -11,8 +11,6 @@
namespace Monolog\Handler;
use Monolog\Logger;
/**
* No-op
*

View File

@@ -66,10 +66,10 @@ class PHPConsoleHandler extends AbstractProcessingHandler
private $connector;
/**
* @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details
* @param Connector|null $connector Instance of \PhpConsole\Connector class (optional)
* @param int $level
* @param bool $bubble
* @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details
* @param Connector|null $connector Instance of \PhpConsole\Connector class (optional)
* @param int $level
* @param bool $bubble
* @throws RuntimeException
*/
public function __construct(array $options = [], Connector $connector = null, $level = Logger::DEBUG, $bubble = true)

View File

@@ -222,7 +222,7 @@ class RavenHandler extends AbstractProcessingHandler
}
/**
* @param string $value
* @param string $value
* @return self
*/
public function setRelease($value)

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -127,7 +127,7 @@ class SlackRecord
'color' => $this->getAttachmentColor($record['level']),
'fields' => array(),
'mrkdwn_in' => array('fields'),
'ts' => $record['datetime']->getTimestamp()
'ts' => $record['datetime']->getTimestamp(),
);
if ($this->useShortAttachment) {
@@ -137,7 +137,6 @@ class SlackRecord
$attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name']);
}
if ($this->includeContextAndExtra) {
foreach (array('extra', 'context') as $key) {
if (empty($record[$key])) {
@@ -229,7 +228,7 @@ class SlackRecord
/**
* Generates attachment field
*
* @param string $title
* @param string $title
* @param string|array $value\
*
* @return array
@@ -243,7 +242,7 @@ class SlackRecord
return array(
'title' => $title,
'value' => $value,
'short' => false
'short' => false,
);
}

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -36,16 +36,16 @@ class SlackWebhookHandler extends AbstractProcessingHandler
private $slackRecord;
/**
* @param string $webhookUrl Slack Webhook URL
* @param string|null $channel Slack channel (encoded ID or name)
* @param string|null $username Name of a bot
* @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise)
* @param string|null $iconEmoji The emoji name to use (or null)
* @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style
* @param bool $includeContextAndExtra Whether the attachment should include context and extra data
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2']
* @param string $webhookUrl Slack Webhook URL
* @param string|null $channel Slack channel (encoded ID or name)
* @param string|null $username Name of a bot
* @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise)
* @param string|null $iconEmoji The emoji name to use (or null)
* @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style
* @param bool $includeContextAndExtra Whether the attachment should include context and extra data
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2']
*/
public function __construct($webhookUrl, $channel = null, $username = null, $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeContextAndExtra = false, $level = Logger::CRITICAL, $bubble = true, array $excludeFields = array())
{

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -40,11 +40,11 @@ class SlackbotHandler extends AbstractProcessingHandler
private $channel;
/**
* @param string $slackTeam Slack team slug
* @param string $token Slackbot token
* @param string $channel Slack channel (encoded ID or name)
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
* @param string $slackTeam Slack team slug
* @param string $token Slackbot token
* @param string $channel Slack channel (encoded ID or name)
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
*/
public function __construct($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true)
{

View File

@@ -125,7 +125,7 @@ class StreamHandler extends AbstractProcessingHandler
/**
* Write to stream
* @param resource $stream
* @param array $record
* @param array $record
*/
protected function streamWrite($stream, array $record)
{