W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1996

Log files.

From: Anselm Baird-Smith <abaird@w3.org>
Date: Tue, 25 Jun 1996 19:40:24 +0500
Message-Id: <9606252340.AA04178@www18.w3.org>
To: mark@intraspect.com
Cc: www-jigsaw@w3.org
Mark Friedman writes:
 > There are a few things about log files that I'd like some clarification 
 > on. Note that these remoarks apply to a server that I'm currently running 
 > as a proxy (on Windows NT 4.0 beta2 if that matters), but I suspect that 
 > the same questions apply to the non-proxy case.
 > 
 > First off, I notice that the writes to the log and traces files don't 
 > flush. This is unfortunate, especially for the traces file when your 
 > trying to debug.

That's funny, at least for the log file, and on solaris, there is a
single write through a RandomAccessFile, which is not specified as
bufferring (see the output method of
w3c.jigsaw.http.CommonLogger). However, to be on the safe side, you
could add the flush (hum, I am not even sure RandomeAccessFile has a
flush method ? - it doesn't I just checked, would this be a java bug
on winNt ?)


 > Secondly, the date is a month off. Here is a log entry from yesterday:
 > 
 >   205.158.53.65 - - [24/5/1996:16:4:32 +7] "GET http://www.microsoft.com/ 
 > HTTP/1.0" 200 14557
Oops, this is a bug (due to Java counting monthes from 0 instead of
1), you can correct it on your own version (still in the CommonLogger
class), it will be in next release.
diff -r1.1 CommonLogger.java
155c155
<                     + "/" + now.getMonth()
---
>                     + "/" + (now.getMonth()+1)

 > Lastly, what is the proper way to shut down a server? When I use the 
 > Admin "exit" link it doesn't seem to kill the process. And if I just kill 
 > the process manually (which seems to be my only choice with the proxy, 
 > since I can't access any non-proxy resources) it doesn't seem to flush 
 > the log buffers. I also worry about other cleanup activities not 
 > happening if I kill the process.

The proper way is to GET /Admin/Exit. On Win* there is a bug due to
daemon thread that won't make the process exit, however, you should
still see the http://../ done message, at which point it is safe to
kill the server manually. Killing it by some other mean may be unsafe,
it is recommended not to do it !

Anselm.
 
Received on Tuesday, 25 June 1996 19:40:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT