Have you tried looking at the names of the customer logs using:
@customlog = $base->customlog();
This returns an array containing "nicknames" of the custom logs defined in the $httpd_conf. It is a nickname that you pass to the getCustomLog method.
This is included in the cpan documentation Apache::ParseLog | [reply] [d/l] |
Yes, I've tried that - the array returned by $base->customlog() has only one value, 'combined' (this is presumably OK since there's only one LogFormat entry in my httpd.conf):
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
There is one CustomLog entry in my httpd.conf specifying the use of the 'combined' LogFormat:
CustomLog /var/log/apache2/access_log combined
Yet the script gives me the error:
Apache::ParseLog::getCustomLog: combined does not exist, Exiting
Thanks,
Jim
| [reply] |
I've had a play around with this in the debugger and found that you get this error if the ServerRoot in your Apache conf file has quotes around it. So if you change:
ServerRoot "/usr/local/apache"
to:
ServerRoot /usr/local/apache
Then it will probably work (certainly did for me). It looks like the module doesn't take the quotes into consideration...
Update: I have raise a bug report on cpan Ticket 28717 | [reply] [d/l] [select] |