httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject Re: new logs and errno
Date Sat, 13 Sep 1997 03:03:04 GMT
On Fri, 12 Sep 1997, Marc Slemko wrote:

> I am somewhat concerned about the way some log messages are handled with
> the new logs.  Specifically, those that used to call log_unixerr.  For
> those it can be _critical_ that errno is included because that is 99% of
> the message.  Right now, that doesn't happen unless the logging level is
> set high enough.
> Other messages will have completely misleading errnos in them because it
> doesn't have any meaning in that context.

Some examples:

[Fri Sep 12 20:44:38 1997] [emerg] Cannot reopen lock file: /usr/local/etc/httpd

(from my own code; my LogLevel wasn't high enough, so it didn't give
any useful information like it would of if it had used
log_unixerr like such things did before)

So, I increase the log level:

[Fri Sep 12 20:47:54 1997] [info] 0: Undefined error: 0: mod_unique_id.c: 172: m
od_unique_id: using ip addr

People already think everything in the error log is an error.  Having
it labelled as an error isn't going to help that.

Same here:

[Fri Sep 12 20:47:55 1997] [info] 0: Undefined error: 0: http_main.c: 3350: Apac
he HTTP Server version: Apache/1.3b1-dev
[Fri Sep 12 20:47:55 1997] [info] 0: Undefined error: 0: http_main.c: 3352: Serv
er built: Fri Sep 12 20:44:32 MDT 1997
[Fri Sep 12 20:47:55 1997] [info] 0: Undefined error: 0: http_main.c: 3354: Serv
er configured -- resuming normal operations

and an irrelevant errno is:

[Fri Sep 12 20:48:13 1997] [notice] 4: Interrupted system call: http_main.c: 342
6: httpd: caught SIGTERM, shutting down

My suggestion would be to re-examine the idea of having multiple logging
calls.  You can still have something similar to log_unixerr that can still
be called.  You may even be able to get away with just making it a macro.
In any case, it can use the same backend as aplog_error.

I do like the new format, but this does need to be resolved.

Oh, did you ever think of having some way to make the logging format
configurable similar to mod_log_config but far more limited?  What I am
mainly thinking of is some way to include a virtualhost name in the
messages logged by Apache...

View raw message