mirror of
				https://github.com/Seldaek/monolog.git
				synced 2025-10-23 09:36:11 +02:00 
			
		
		
		
	Remove support for legacy Gelf lib
This commit is contained in:
		| @@ -18,7 +18,7 @@ | ||||
|     }, | ||||
|     "require-dev": { | ||||
|         "phpunit/phpunit": "^5.0", | ||||
|         "graylog2/gelf-php": "~1.0", | ||||
|         "graylog2/gelf-php": "^1.0.1", | ||||
|         "sentry/sentry": "^0.13", | ||||
|         "ruflin/elastica": ">=0.90 <3.0", | ||||
|         "doctrine/couchdb": "~1.0@dev", | ||||
|   | ||||
| @@ -11,9 +11,7 @@ | ||||
|  | ||||
| namespace Monolog\Handler; | ||||
|  | ||||
| use Gelf\IMessagePublisher; | ||||
| use Gelf\PublisherInterface; | ||||
| use Gelf\Publisher; | ||||
| use InvalidArgumentException; | ||||
| use Monolog\Logger; | ||||
| use Monolog\Formatter\GelfMessageFormatter; | ||||
| @@ -33,18 +31,14 @@ class GelfHandler extends AbstractProcessingHandler | ||||
|     protected $publisher; | ||||
|  | ||||
|     /** | ||||
|      * @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object | ||||
|      * @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 PublisherInterface $publisher a publisher object | ||||
|      * @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($publisher, $level = Logger::DEBUG, $bubble = true) | ||||
|     public function __construct(PublisherInterface $publisher, $level = Logger::DEBUG, $bubble = true) | ||||
|     { | ||||
|         parent::__construct($level, $bubble); | ||||
|  | ||||
|         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