Why shouldn't the Apache web server access log be in the correct format?

in the classroom, we were tasked with analyzing the access log and recording all successful attempts. While examining the Apache web server access log, I came across multiple instances, approximately 3/100 000 logs, that the format was incorrect. The log will appear as for example96.45.3.2 - - [14/Mar/2011:00:12:33 -0400] "GET webpage.html HTTP/1.1" 400 236 - -

I am not asking how to parse a file, I am just wondering what happens if the format is not complete? Is the custom browser out of order? Power outage? Ect.

Also, when analyzing the file, I noticed that in one particular instance, index [8] (which should be 200 300 400 500 codes) was an error where index [8] would be 1.1 inches.

Any ideas?


source to share

1 answer

"-" simply indicate that field information is not available (http://httpd.apache.org/docs/2.2/logs.html). These last two hyphens simply mean that all the information that needs to be logged was not there when the message was issued.

The second part about index [8] is that you make assumptions about how the log line is formatted. I would bet that you are splitting across spaces and there is a space in the line.



All Articles