1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-31 10:20:14 +02:00

Rename referer->referrer and server_name->server, update changelog

This commit is contained in:
Jordi Boggiano
2012-04-22 11:26:54 +02:00
parent b4c12e9f2c
commit 3c4bc178cc
3 changed files with 7 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
* 1.0.3 (2012--) * 1.1.0 (2012--)
Changes: Changes:
@@ -6,6 +6,7 @@
handle the given log level handle the given log level
* Added ChromePHPHandler * Added ChromePHPHandler
* Added possibility to show microseconds in logs * Added possibility to show microseconds in logs
* Added `server` and `referer` to WebProcessor output
* 1.0.2 (2011-10-24) * 1.0.2 (2011-10-24)

View File

@@ -56,8 +56,8 @@ class WebProcessor
'url' => $this->serverData['REQUEST_URI'], 'url' => $this->serverData['REQUEST_URI'],
'ip' => $this->serverData['REMOTE_ADDR'], 'ip' => $this->serverData['REMOTE_ADDR'],
'http_method' => $this->serverData['REQUEST_METHOD'], 'http_method' => $this->serverData['REQUEST_METHOD'],
'server_name' => $this->serverData['SERVER_NAME'], 'server' => $this->serverData['SERVER_NAME'],
'referer' => $this->serverData['HTTP_REFERER'], 'referrer' => $this->serverData['HTTP_REFERER'],
) )
); );

View File

@@ -30,8 +30,8 @@ class WebProcessorTest extends TestCase
$this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']);
$this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']); $this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']);
$this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']); $this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']);
$this->assertEquals($server['HTTP_REFERER'], $record['extra']['referer']); $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']);
$this->assertEquals($server['SERVER_NAME'], $record['extra']['server_name']); $this->assertEquals($server['SERVER_NAME'], $record['extra']['server']);
} }
public function testProcessorDoNothingIfNoRequestUri() public function testProcessorDoNothingIfNoRequestUri()
@@ -55,7 +55,7 @@ class WebProcessorTest extends TestCase
); );
$processor = new WebProcessor($server); $processor = new WebProcessor($server);
$record = $processor($this->getRecord()); $record = $processor($this->getRecord());
$this->assertNull($record['extra']['referer']); $this->assertNull($record['extra']['referrer']);
} }
/** /**