From:                   [EMAIL PROTECTED]
Date sent:              Wed, 17 Feb 1999 14:21:24 -0500
To:                     <[EMAIL PROTECTED]>
Subject:                [analog-help] Corrupt Log File Entries
Send reply to:          [EMAIL PROTECTED]

> I've taken a close look at my log file entries that Analog is reporting as 
> corrupt (unable to process) and discovered they have something in common.  The 
> referrer portion includes embedded quotes.  I've included below a sample of some

I am averaging about 1 a month of these type of requests, not 
really to big of a deal. I can see where it would be a nuisance in 
your case, though. The only thing that I could come up with was to 
make a program that would be to remove the extra quotes and 
perhaps replace them with something else.

While looking at your sample log files I came up with something 
that should fix any lines with that problem. I am not sure what to 
replace the offending quotes with yet, a blank would be the 
simplest I suppose.

Anyways the solution is to preprocess the log files with a program 
that removes the quotes and replace them with something else. 
The algorithm I came up with is this: (in pseudo code)

open logfile
while not end of file
 read record
 find first quote of the referer field
 count = 1
 while not end of line
  find next quote
  count = count+1
 wend
 if count = 6 then
  find second quote (from start of referer)
  replace with space
  find third quote 
  replace with space
 end if
 write record
wend
close log file
end

Of course this is only pseudo code and would have to be converted 
to a programming language and compiled. I can't see why it 
wouldn't work though. I could put the source code together in C and 
make it available once I get it worked out.

As to including it in Analog, I would have to go through the source 
to see if it is worth while or even doable. Stephen could probably 
answer this one better than me.

Take Care


Jim Foley
The Information Wizard
http://momp.hypermart.net/
[EMAIL PROTECTED]
--------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
--------------------------------------------------------------------

Reply via email to