[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] SPLIT LOG -- Programming Help Requested



Hi,

With all the issues surrounding the split log application, I am thinking of
downloading the common log file, and splitting it using my own utility on my
NT Server.   Because I am running my own statistics application, this would
simplify a lot my job because I would only have to download 1 log file
(instead of 100+ web.log files), which would then be split into x logs (1
for each domain).  Those logs would be split and reside on an NT server
which runs the Live Statistics 5.02 application.

The problem is...  how to go about designing this "simple" split log
application.  In theory, it is very simple.  Here's an example of the common
log file :

www.datasecure.net 127.0.0.1 - - [10/Mar/2000:20:45:02 -0800] "HEAD / HTTP"
200 0 "-" "-"
www.webcontact.net 24.200.5.247 - - [10/Mar/2000:20:57:54 -0800] "GET
/siteadmin HTTP/1.1" 302 261 "-" "Mozilla/4.0 (compatible; MSIE 5.01;
Windows NT 5.0)"

The name of the virtual host is located at the start of each entry.  Based
on my example above, the split log application will :
- create two log files, one called datasecure.net_log, the other one called
webcontact.net_log,
- strip the domain name (www.datasecure.net, and www.webcontact.net) from
each log entry
- output the log entry in the appropriate file (datasecure.net_log or
webcontact.net_log)

Unfortunately, my programming knowledge of PERL is close to non-existant,
but I suspect this can be very straight-forward to develop in PERL.

Would anyone in this list be willing to give me a hand, and create a script
that could do this task?    If necessary, contact me offline by e-mail
(regis.holstein@xxxxxxxxxx)

Thanks very much! :)

Regis Holstein
TDS Communications