Apache error_log format

Apache error_log format

Post by Brian Tieman » Tue, 17 Mar 1998 04:00:00



Hello again. :)

        Okay, so-- I've got this problem where the error_log in Apache/1.3b5
seems reluctant to log in the way I'd hope it would. For instance, I'm
getting entries such as:

date: not found

        This provides me with no information as to what called date, why it's
not finding it, whether it's being called from a parsed HTML file or a
CGI-- anything useful.
        I've noticed people seeming to be able to set the logging level, so
that it will log things at the [info] level or some such; I also
remember "file not found" errors logging the referring URL that called
the missing file. Those were very very useful features. How can I turn
them on again?

        Thanks!

Brian

 
 
 

Apache error_log format

Post by David Richar » Tue, 17 Mar 1998 04:00:00




Quote:>    Okay, so-- I've got this problem where the error_log in Apache/1.3b5

Entries written by _apache_ do follow some standard format(s).

Quote:>seems reluctant to log in the way I'd hope it would. For instance, I'm
>getting entries such as:

>date: not found

The error_log gets anything that any CGI/SSI-exec writes to STDERR, directly
with no place for Apache to reformat the strings.

Quote:>    This provides me with no information as to what called date, why it's
>not finding it, whether it's being called from a parsed HTML file or a
>CGI-- anything useful.

It helps to rewrite your CGIs with good error handling, the case with SSI
is a little bit more tricky- if you try to run 'date' from a SSI 'exec',
what actually happens is that Apache spawns a shell process and tells the
shell it's supposed to execute something called 'date'. The shell then
searches the PATH for a program by that name, if it fails it writes a
string like the one you saw in your log file to STDERRR, which goes to the
error log.

Quote:>    I've noticed people seeming to be able to set the logging level, so
>that it will log things at the [info] level or some such; I also
>remember "file not found" errors logging the referring URL that called
>the missing file. Those were very very useful features. How can I turn
>them on again?

If _Apache_ cannot find the file, it will log the problem very verbosely,
what happens when a program called from apache cannot find some sub-program
depends on the program and it's author (hint hint).

As far as CGI and HTML files not found, I prefer to use LogFormat to write
the access_log in NCSA's standardized Extended Logfile Format, then just
grep the access_log for result codes.

 
 
 

1. New error_log format

        Hi again--

        Just out of curiosity... in the new error_log format in Apache
1.3, how come spawning new servers is treated as such a dire thing?

[Tue Oct 21 20:31:36 1997] [error] server seems busy, spawning 4 children
(you may need to increase StartServers, or Min/MaxSpareServers)

        I thought Apache was designed to spawn new servers as load
required, and then to let them die off as directed by Min/MaxSpareServers.
That's indeed how it behaves for me, and the settings for my server are
about evenly matched with the number of httpd processes at any given time.
Yet whenever it needs to spawn a few new processes, I get the above
message in my error_log.

        It's just a semantics thing, I realize-- but shouldn't it be
considered less an "error" and more a "notice"? And should it really be so
stern about telling the administrator to reconfigure each time it appears?
Unless, of course, it's spawning 16 or more new processes at once...

Brian

2. Netscape can't run Java

3. CustomLog format to error_log?

4. Bent fonts

5. Apache error_log: socket error: accept failed

6. Installation problem

7. Apache/error_log:Could not open password file

8. vfstab added entry not mounting...

9. Control chars in apache error_log

10. Solaris mmap error in Apache error_log?

11. Apache error_log 'lost connection to client'

12. apache 1.1.1 error_log entry

13. apache's error_log file