Bug 64232 - tux2w3c doesn't display correct output of TUX log
tux2w3c doesn't display correct output of TUX log
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tux (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ingo Molnar
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-29 18:38 EDT by David Morse
Modified: 2007-04-18 12:42 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-30 17:13:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fixes timezone truncation, shows status & bytes sent in common log mode (499 bytes, patch)
2002-04-30 17:07 EDT, David Morse
no flags Details | Diff

  None (edit)
Description David Morse 2002-04-29 18:38:01 EDT
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
Comment 1 Ingo Molnar 2002-04-30 05:35:51 EDT
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?
Comment 2 David Morse 2002-04-30 10:20:07 EDT
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.
Comment 3 David Morse 2002-04-30 17:07:41 EDT
Created attachment 55945 [details]
Fixes timezone truncation, shows status & bytes sent in common log mode
Comment 4 David Morse 2002-04-30 17:13:53 EDT
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.
Comment 5 Ingo Molnar 2002-05-05 09:44:25 EDT
okay, fix is in CVS, tarball uploaded.

Note You need to log in before you can comment on or make changes to this bug.