NAME
Nginx::ParseLog - module for parsing Nginx access log files (nginx.net).
SYNOPSIS
use Nginx::ParseLog;
use Data::Dumper;
my $log_string = '92.241.180.118 - - [28/Mar/2009:20:59:02 +0300] "GET / HTTP/1.1" 200 1706 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"';
my $deparsed = Nginx::ParseLog::parse($log_string);
warn Data::Dumper($deparsed);
{
'request' => 'GET / HTTP/1.1',
'user_agent' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7',
'status' => '200',
'time' => '28/Mar/2009:20:59:02 +0300',
'ip' => '92.241.180.118',
'bytes_send' => '1706',
'remote_user' => '-',
'referer' => '-'
}