Reputation: 61
My Analog 6.0 is not able to recognize my access log format please find the below details and helping me correcting my log format
My Apache log format:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b %T %D" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
My Analog 6.0 Log format: I have tried the below two log formats
APACHELOGFORMAT (%h %l %u %t \"%r\" %>s %b %T %D)
LOGFORMAT (%s %j %j [%d/%M/%Y:%h:%n:%j] "%j %r %j" %c %b %T %D\n)
My access log:
192.168.140.253 - - [07/Mar/2016:00:12:46 -0500] "POST /XXXX/XXXXX/XXXXXXX HTTP/1.1" 200 58 0 21359
192.168.140.253 - - [07/Mar/2016:00:12:48 -0500] "GET /XXXX/XXXXX/XXXXXX HTTP/1.1" 200 1670 0 7325
192.168.140.253 - - [07/Mar/2016:00:12:48 -0500] "POST /XXXX/XXXXX/XXXXXX HTTP/1.1" 200 58 0 8106
192.168.140.253 - - [07/Mar/2016:00:12:51 -0500] "GET //XXXX/XXXXX/XXXXXX HTTP/1.1" 200 1768 0 4108
192.168.140.253 - - [07/Mar/2016:00:12:52 -0500] "POST /XXXX/XXXXX/XXXXXX HTTP/1.1" 200 58 0 18648
Error:
F:\analog_60>analog.exe
analog.exe: analog version 6.0/Win32
analog.exe: Warning C: Bad argument in configuration command: ignoring it:
LOGFORMAT (%S %j %j [%d/%M/%Y:%h:%n:%j] "%j%w%r%w HTTP%j" %c %b %T %D\n)
analog.exe: ...cont..: (reason: one item occurs twice in format)
(For help on all errors and warnings, see docs/errors.html)
analog.exe: Warning E: Redirecting future diagnostic messages to errors.txt
F:\analog_60>analog.exe
Upvotes: 0
Views: 150
Reputation: 116
try this
replace %D\n
by %j
and use this syntax in analog.cfg
LOGFORMAT (%S %j %j [%d/%M/%Y:%h:%n:%j] "%j %r %j" %c %b %t %j)
I was able to get stat with your access.log lines
note:
If you want to activate Processing Time Report
add PROCTIME ON
at the end of your analog.cfg
Hope it helps
Upvotes: 1