Mike's Pub -> Discussion Corner -> Support Forum for aWebVisit

 format IIS [ Reply ] [ Back to Index ] Top Bottom

Author : arno
Date: 2002/02/18 14:46

Hello,

I'm using this format IIS :
 date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem
cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken cs-version cs-host
cs(User-Agent) cs(Cookie) cs(Referer) 

You say that if you use logfiles of another format (e.g. IIS), you can change the regular
expression in the loop below...

but i don't know how to do it,

Thanks for any help !

Arno


 Re: format IIS [ Reply ] [ Back to Index ] Top Bottom

Author : Mike
Date: 2002/02/19 12:02

You could use something like this :
	# replace this
	#unless (($host,$date,$hour,$min,$sec,$url,$status) =
/^(\S+)$sep\S+$sep\S+$sep\[([^:]+):(\d+):(\d+):(\d+).*\]$sep\"\S+$sep(\S+)$sep\S+\"$sep(\S+)$sep\S+/o
) {
	# with this
	($date,$time,$host,undef,undef,undef,undef,undef,$url,undef,$status,undef,undef,undef,undef,undef,$agent,$cookie,$ref)
= split;
	($hour,$min,$sec) = split(/:/,$time);
	unless ($url && $status) {
	# the rest of the script doesn't change
		$skipentry = $_;
		...

Try printing out the variables as a test, to make sure there's no missing undef somewhere
:-)

 Reply [ Back to Index ] Top Bottom
Name :
E-mail : (optional)
Subject :
Message :
MathGuard security question: 8 + 4 =
 

Mike's Pub -> Discussion Corner -> Support Forum for aWebVisit