mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-09 14:46:46 +02:00
Remove RavenFormatter; this is not needed since Raven is a very simple
text-oriented interface and doesn't need special processing.
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
*
|
||||
* (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.
|
||||
*/
|
||||
|
||||
namespace Monolog\Formatter;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Raven_Client;
|
||||
|
||||
/**
|
||||
* Serializes a log message for Raven (https://github.com/getsentry/raven-php)
|
||||
*
|
||||
* @author Marc Abramowitz <marc@marc-abramowitz.com>
|
||||
*/
|
||||
class RavenFormatter extends NormalizerFormatter
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function format(array $record)
|
||||
{
|
||||
return $record['channel'] . ': ' . $record['message'];
|
||||
}
|
||||
}
|
@@ -13,7 +13,6 @@ namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\AbstractProcessingHandler;
|
||||
use Monolog\Formatter\RavenFormatter;
|
||||
use \Raven_Client;
|
||||
|
||||
/**
|
||||
@@ -68,7 +67,7 @@ class RavenHandler extends AbstractProcessingHandler
|
||||
{
|
||||
$this->ravenClient->captureMessage(
|
||||
$record['formatted'],
|
||||
$record['formatted'], // $params
|
||||
array(), // $params - not used
|
||||
$this->logLevels[$record['level']], // $level
|
||||
false // $stack
|
||||
);
|
||||
@@ -76,12 +75,4 @@ class RavenHandler extends AbstractProcessingHandler
|
||||
$this->ravenClient->captureException($record['context']['exception']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getDefaultFormatter()
|
||||
{
|
||||
return new RavenFormatter();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user