mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 06:06:40 +02:00
Fix min requirements
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"phpunit/phpunit": "~4.5",
|
||||
"graylog2/gelf-php": "~1.0",
|
||||
"raven/raven": "~0.5",
|
||||
"ruflin/elastica": ">=0.90 <3.0",
|
||||
|
@@ -13,6 +13,7 @@ namespace Monolog\Handler;
|
||||
|
||||
use Gelf\IMessagePublisher;
|
||||
use Gelf\PublisherInterface;
|
||||
use Gelf\Publisher;
|
||||
use InvalidArgumentException;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Formatter\GelfMessageFormatter;
|
||||
@@ -31,16 +32,16 @@ class GelfHandler extends AbstractProcessingHandler
|
||||
protected $publisher;
|
||||
|
||||
/**
|
||||
* @param PublisherInterface|IMessagePublisher $publisher a publisher object
|
||||
* @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 PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object
|
||||
* @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
|
||||
*/
|
||||
public function __construct($publisher, $level = Logger::DEBUG, $bubble = true)
|
||||
{
|
||||
parent::__construct($level, $bubble);
|
||||
|
||||
if (!$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) {
|
||||
throw new InvalidArgumentException("Invalid publisher, expected a Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
|
||||
if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) {
|
||||
throw new InvalidArgumentException("Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance");
|
||||
}
|
||||
|
||||
$this->publisher = $publisher;
|
||||
|
Reference in New Issue
Block a user