Skip to content
Browse files

Rename classnames to LogstashFormatter as suggested by @stof

  • Loading branch information...
1 parent 32e6bff commit 6aaf70d3632977db0c414351ff6390bda484d1b8 @timmow timmow committed Dec 10, 2012
Showing with 14 additions and 14 deletions.
  1. +1 −1 src/Monolog/Formatter/LogstashFormatter.php
  2. +13 −13 tests/Monolog/Formatter/LogstashFormatterTest.php
View
2 src/Monolog/Formatter/LogstashFormatter.php
@@ -20,7 +20,7 @@
*
* @author Tim Mower <timothy.mower@gmail.com>
*/
-class LogstashEventFormatter extends NormalizerFormatter
+class LogstashFormatter extends NormalizerFormatter
{
/**
* @var string the name of the system for the Gelf log message
View
26 tests/Monolog/Formatter/LogstashFormatterTest.php
@@ -12,17 +12,17 @@
namespace Monolog\Formatter;
use Monolog\Logger;
-use Monolog\Formatter\LogstashEventFormatter;
+use Monolog\Formatter\LogstashFormatter;
-class LogstashEventFormatterTest extends \PHPUnit_Framework_TestCase
+class LogstashFormatterTest extends \PHPUnit_Framework_TestCase
{
/**
- * @covers Monolog\Formatter\LogstashEventFormatter::format
+ * @covers Monolog\Formatter\LogstashFormatter::format
*/
public function testDefaultFormatter()
{
- $formatter = new LogstashEventFormatter('test');
+ $formatter = new LogstashFormatter('test');
$record = array(
'level' => Logger::ERROR,
'level_name' => 'ERROR',
@@ -42,19 +42,19 @@ public function testDefaultFormatter()
$this->assertEquals(Logger::ERROR, $message['@fields']['level']);
$this->assertEquals('test', $message['@source']);
- $formatter = new LogstashEventFormatter('mysystem');
+ $formatter = new LogstashFormatter('mysystem');
$message = json_decode($formatter->format($record), true);
$this->assertEquals('mysystem', $message['@source']);
}
/**
- * @covers Monolog\Formatter\LogstashEventFormatter::format
+ * @covers Monolog\Formatter\LogstashFormatter::format
*/
public function testFormatWithFileAndLine()
{
- $formatter = new LogstashEventFormatter('test');
+ $formatter = new LogstashFormatter('test');
$record = array(
'level' => Logger::ERROR,
'level_name' => 'ERROR',
@@ -72,11 +72,11 @@ public function testFormatWithFileAndLine()
}
/**
- * @covers Monolog\Formatter\LogstashEventFormatter::format
+ * @covers Monolog\Formatter\LogstashFormatter::format
*/
public function testFormatWithContext()
{
- $formatter = new LogstashEventFormatter('test');
+ $formatter = new LogstashFormatter('test');
$record = array(
'level' => Logger::ERROR,
'level_name' => 'ERROR',
@@ -96,7 +96,7 @@ public function testFormatWithContext()
$this->assertEquals('logger', $message_array['ctxt_from']);
// Test with extraPrefix
- $formatter = new LogstashEventFormatter('test', null, 'CTX');
+ $formatter = new LogstashFormatter('test', null, 'CTX');
$message = json_decode($formatter->format($record), true);
@@ -108,11 +108,11 @@ public function testFormatWithContext()
}
/**
- * @covers Monolog\Formatter\LogstashEventFormatter::format
+ * @covers Monolog\Formatter\LogstashFormatter::format
*/
public function testFormatWithExtra()
{
- $formatter = new LogstashEventFormatter('test');
+ $formatter = new LogstashFormatter('test');
$record = array(
'level' => Logger::ERROR,
'level_name' => 'ERROR',
@@ -131,7 +131,7 @@ public function testFormatWithExtra()
$this->assertEquals('pair', $message_array['key']);
// Test with extraPrefix
- $formatter = new LogstashEventFormatter('test', 'EXT');
+ $formatter = new LogstashFormatter('test', 'EXT');
$message = json_decode($formatter->format($record), true);
$message_array = $message['@fields'];

0 comments on commit 6aaf70d

Please sign in to comment.
Something went wrong with that request. Please try again.