Description of problem: tux2w3c in tux-2.2.5-1 does not display all the HTTP headers correctly, i.e. no HTTP status code, no bytes sent. Running tux2w3c from tux-2.2.0-1 displays the log correctly, so the problem is in the user-space tux2w3c conversion program. Version-Release number of selected component (if applicable): 2.2.5-1 How reproducible: Always Steps to Reproduce: 1. Start TUX with logging enabled 2. /usr/sbin/tux2w3c /var/log/tux Actual Results: From tux-2.2.5-1: 127.0.0.1 - - [29/Apr/2002:17:31:22 -040] "GET /index/html HTTP/1.1" "-" "" 127.0.0.1 - - [29/Apr/2002:17:31:34 -040] "GET /index.html HTTP/1.1" "-" "" Expected Results: From tux-2.2.0-1: 127.0.0.1 - - Mon Apr 29 17:31:22 2002 "GET /index/html HTTP/1.1" - 0 404 127.0.0.1 - - Mon Apr 29 17:31:34 2002 "GET /index.html HTTP/1.1" - 2890 200
we switched the default tux2w3c output to be that of Apache's, so that log analyzer software can parse it. There is a new option, -b, which should give you the old-style format - does that fix the problem for you?
The -b option shows the old-style output with the correct headers; however, the Apache style is broken. [root@pe1650 root]# tux2w3c -b /var/log/tux 127.0.0.1 - - Mon Apr 29 17:31:22 2002 "GET /index/html HTTP/1.1" - 0 404 127.0.0.1 - - Mon Apr 29 17:31:34 2002 "GET /index.html HTTP/1.1" - 2890 200 [root@pe1650 root]# tux2w3c /var/log/tux 127.0.0.1 - - [29/Apr/2002:17:31:22 -040] "GET /index/html HTTP/1.1" "-" "" 127.0.0.1 - - [29/Apr/2002:17:31:34 -040] "GET /index.html HTTP/1.1" "-" "" [root@pe1650 root]# cat /var/log/httpd/access_log 127.0.0.1 - - [30/Apr/2002:09:11:43 -0400] "GET /index/html HTTP/1.1" 404 294 "- " "Elinks (0.3; Linux 2.4.18-3smp i686)" 127.0.0.1 - - [30/Apr/2002:09:12:11 -0400] "GET /index.html HTTP/1.1" 200 2890 "-" "Elinks (0.3; Linux 2.4.18-3smp i686)" The Apache style includes HTTP status, bytes sent, and User-Agent. While the User-Agent is not as important, I think the first two are. It also appears the timezone is missing a trailing 0, i.e. -040 shold be -0400.
Created attachment 55945 [details] Fixes timezone truncation, shows status & bytes sent in common log mode
I've attached a patch to fix the problems reported above and verified that extended log format did not break. First fix only truncates last byte if time obtain via ctime() (which adds a \n); in combined mode it was truncating the last digit of the timezone obtained via strftime(). Second fix is to print HTTP status and bytes sent, regardless of whether extended logging mode was used.
okay, fix is in CVS, tarball uploaded.