Forum

LogFormat - Awstats

Prit
14 July 2009, 23:39
Hi Hugo,

I was trying to access the Hiawatha logfile using Awstats. Hence, I changed the log format by adding this line to httpd.conf
LogFormat = extended


The log files are not being created when using this option. I tried "common" and the log files are still not being created. If I omit this option altogether from my httpd.conf, then the logs files get created correctly. Not sure what is happening here.

Hiawatha version: 6.15
Operating System: Ubuntu 9.04
Hugo Leisink
15 July 2009, 02:33
Do you really mean the logfiles themselves or just the entries in a logfile?

Either way, I just tested it. And I all works fine here.
Prit
15 July 2009, 02:48
Okay. Now the log files are getting created. Don't have a clue what happened.

When I run Awstats against the log files, it says "corrupted records". Any idea which log format should I choose in Awstats if I am using LogFormat = extended in Hiawatha?

Here are the Awstats LogFormat values:
1 - Apache or Lotus Notes/Domino native combined log format (NCSA combined/XLF
2 - IIS or ISA format (IIS W3C log format). See FAQ-COM115 For ISA.
3 - Webstar native log format.
4 - Apache or Squid native common log format (NCSA common/CLF log format)
Hugo Leisink
15 July 2009, 09:09
I think 1=extended and 4=common. Both are supported by Hiawatha. Maybe awstat is reporting about corrupt logs because there are log entries in Hiawatha's native format present in the logfile?

A friend of mine is also using the extended logformat for awstats. Works oke for him.
Prit
15 July 2009, 11:10
I tried LogFormat = extended in Hiawatha and LogFormat = 1 in Awstats. I still get corrupted records. Comparing the apache log vs Hiawaths log, here is how they look:

Apache:
75.84.219.121 - - [11/Jul/2009:21:01:33 -0700] "GET /phpmyadmin/ HTTP/1.1" 200 2449 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5"


Hiawatha:
75.84.219.121 -  [14/Jul/2009:23:45:30 -0700] "GET /index.php?=X1231231233-1233-123k-1233-09A098A09808 HTTP/1.1" 200 2717 "http://me.prit.us/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11"


I tried giving a personal format in Awstats, but still does not work. Would be great to have Awstats working with Hiawatha logs.
Hugo Leisink
15 July 2009, 11:51
There is indeed a bug in Hiawatha's extended logformat. I just sent you a fixed version of Hiawatha. Please test that one for me.
Prit
15 July 2009, 19:38
Hi Hugo .. thanks for sending me a fixed version. But, it did not fully fix it. Now when I run Awstats, it shows a combination of corrupt records and correct qualified records. I played around with access.log manually editing it and found that it is basically the referer field that it is complaining about. When there is no referer, Apache shows it as "-", but Hiawatha shows it as - (without quotes). I manually added quotes to the empty referers in few records and it worked great.
Hugo Leisink
15 July 2009, 20:19
Sent you a fixed version via e-mail.
Prit
15 July 2009, 21:19
Thanks Hugo. This version has fixed the issues. Now I can see Hiawatha logs in Awstats. Hurray!!
This topic has been closed.