1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-19 23:56:17 +02:00

Added referer to extra parameter

This commit is contained in:
Tiago Ribeiro
2012-04-20 16:44:33 +01:00
parent d348b2c252
commit c8c231f177
3 changed files with 22 additions and 1 deletions

View File

@@ -46,12 +46,17 @@ class WebProcessor
return $record;
}
if (!isset($this->serverData['HTTP_REFERER'])) {
$this->serverData['HTTP_REFERER'] = null;
}
$record['extra'] = array_merge(
$record['extra'],
array(
'url' => $this->serverData['REQUEST_URI'],
'ip' => $this->serverData['REMOTE_ADDR'],
'http_method' => $this->serverData['REQUEST_METHOD'],
'referer' => $this->serverData['HTTP_REFERER'],
)
);