1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 01:26:11 +02:00

Updated GelfHandler/GelfFormatter

Changes monolog to use the updated official graylog2/gelf-php
This commit is contained in:
Benjamin Zikarsky
2013-12-18 21:05:55 +01:00
parent c9db00f882
commit c8289fd654
5 changed files with 63 additions and 61 deletions

View File

@@ -11,29 +11,29 @@
namespace Monolog\Handler;
use Gelf\IMessagePublisher;
use Gelf\Publisher;
use Monolog\Logger;
use Monolog\Handler\AbstractProcessingHandler;
use Monolog\Formatter\GelfMessageFormatter;
/**
* Handler to send messages to a Graylog2 (http://www.graylog2.org) server
*
* @author Matt Lehner <mlehner@gmail.com>
* @author Benjamin Zikarsky <benjamin@zikarsky.de>
*/
class GelfHandler extends AbstractProcessingHandler
{
/**
* @var Gelf\IMessagePublisher the publisher object that sends the message to the server
* @var Publisher the publisher object that sends the message to the server
*/
protected $publisher;
/**
* @param Gelf\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 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(IMessagePublisher $publisher, $level = Logger::DEBUG, $bubble = true)
public function __construct(Publisher $publisher, $level = Logger::DEBUG, $bubble = true)
{
parent::__construct($level, $bubble);