mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 14:16:42 +02:00
Fix min requirements
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
"psr/log": "~1.0"
|
"psr/log": "~1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.0",
|
"phpunit/phpunit": "~4.5",
|
||||||
"graylog2/gelf-php": "~1.0",
|
"graylog2/gelf-php": "~1.0",
|
||||||
"raven/raven": "~0.5",
|
"raven/raven": "~0.5",
|
||||||
"ruflin/elastica": ">=0.90 <3.0",
|
"ruflin/elastica": ">=0.90 <3.0",
|
||||||
|
@@ -13,6 +13,7 @@ namespace Monolog\Handler;
|
|||||||
|
|
||||||
use Gelf\IMessagePublisher;
|
use Gelf\IMessagePublisher;
|
||||||
use Gelf\PublisherInterface;
|
use Gelf\PublisherInterface;
|
||||||
|
use Gelf\Publisher;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
use Monolog\Formatter\GelfMessageFormatter;
|
use Monolog\Formatter\GelfMessageFormatter;
|
||||||
@@ -31,16 +32,16 @@ class GelfHandler extends AbstractProcessingHandler
|
|||||||
protected $publisher;
|
protected $publisher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param PublisherInterface|IMessagePublisher $publisher a publisher object
|
* @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object
|
||||||
* @param integer $level The minimum logging level at which this handler will be triggered
|
* @param integer $level The minimum logging level at which this handler will be triggered
|
||||||
* @param boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
* @param boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
||||||
*/
|
*/
|
||||||
public function __construct($publisher, $level = Logger::DEBUG, $bubble = true)
|
public function __construct($publisher, $level = Logger::DEBUG, $bubble = true)
|
||||||
{
|
{
|
||||||
parent::__construct($level, $bubble);
|
parent::__construct($level, $bubble);
|
||||||
|
|
||||||
if (!$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) {
|
if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) {
|
||||||
throw new InvalidArgumentException("Invalid publisher, expected a Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
|
throw new InvalidArgumentException("Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->publisher = $publisher;
|
$this->publisher = $publisher;
|
||||||
|
Reference in New Issue
Block a user