"Philip, Tim" wrote:

> Given my log file and the default analog.cfg (no logformat specification), I
> get exactly the same errors as if I try to specify a logformat.
>
> I don't recall seeing DEFAULTLOGFORMAT in the docs anywhere, but I just
> tried it and my "just ignore it" logformat appears to work.

docs/logfmt.html.



> I just played with it some more and analog is very weird.  If there is a
> "logfile.log" in my directory, it processes it no matter what.  Even if it
> isn't listed in the config file.  But if I delete it, and specify both a
> logformat and a logfile, that works.  Note that it must be deleted before it
> will work.

If you recall from your SunOS install, there are some defaults that Analog
understands, that are defined in the fiel anlghead.h. On the Windows version,
these are predefined, as the program is already compiled. One of the defaults if
LOGFILE logfile.log. So if Analog finds 'logfile.log' in the current directory,
it uses it along with any other LOGFILE commands it finds.


> At any rate, any idea why the default "combined" format is bombing on those
> extra fields?
> > > #APACHELOGFORMAT ("%h %l %u %t \"%r\" %s %b \"%{Referer}i\"
> > > \"%{User-Agent}i\"")

Going back to read you're previous email, I see that the logfile lines you
provided are not the same as the logformat you've defined above. Which is why
Analog is bombing on the extra fields.

> 10.10.10.19 - - [21/Sep/2000:01:11:33 -0700] "GET /webcheck.html
> HTTP/1.0" 200 74 "-" "-" web2.qa.a.b.foobar.com - - 0
>
> 1.1.1.2 - - [21/Sep/2000:05:31:44 -0700] "GET /images/alogo.jpg HTTP/1.1"
> 304 - "https://qa.a.foobars.com/" "Mozilla/4.0 (compatible; MSIE 5.5;
> Windows NT 4.0)" qa.a.foobar.com SSLv3 RC4-MD5 0

So, back to defining a logformat. I think these should work (you need both to
handle HTTP < 1.0 and HTTP >= 1.0):

LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r%wHTTP%j" %c %b "%f" "%B" %j)
LOGFORMAT (%S %j %u [%d/%M/%Y:%h:%n:%j] "%j%w%r" %c %b "%f" "%B" %j)

Of course, you may need to make them DEFAULTLOGFORMAT. And you also need to put
*LOGFORMAT commands before LOGFILE command that need those formats.

Jeremy Wadsack
Wadsack-Allen Digital Group


------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------

Reply via email to