You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Robinson <dr...@ast.cam.ac.uk> on 1996/02/05 21:14:00 UTC

Re: timestamps in logs

>I've been looking into adding timestamps to the other logs we are looking
>into keeping here, and I've noticed that access log has a different time
>format than error log, and both are logged at different execution times.
>Would it be a better idea for me to bite the bullet and add a timestamp to
>conn_rec to be used for all logging, and make the appropriate changes to
>the rest of the code?
>
>This works for me since it also doesn't break the API, a conn_rec * being
>carried with each request_rec.
>
>If so, is it for compatibility reasons that we have times like
>
>[25/Jan/1996:14:39:14 -0500]
>
>in the access log and
>
>[Thu Jan 25 13:50:47 1996]
>
>in the error log? (BTW, I'm not referring 8^) to the TZ)
>
>I can easily leave things format-wise the same, since I'm not intending
>to timestamp the conn_rec with other than binary time just yet.
>So, if there's no consensus, it'll look just like it does now.

I agree with rst; the error log file time format should be the
same as that of the access log, but you should not put a timestamp in
the conn_rec structure. The best way to achive this is to have a single
routine called something like
logtime(struct tm *t, char buff[TIME_SIZE])
which formats the time correctly.

I also think that some of the information in the error log should go
into the access log; in particular time-out messages.

In addition to the return code sent to the client, the access
log should have a separate indication of whether the server successfully
returned the _whole_ response. 

Also, the error log should be allowed to have continuation lines, beginning
with '-' perhaps; e.g.
[Mon Feb  5 17:29:52 1996] proxy: error binding to ftp data socket
- bind: 255.11.8.88:46224: Address already in use

 David.