Standard Apache Error Logging
Each error log entry is prefixed by the time the error occurred and the client IP address or hostname, if available. As with HTTP request logging, you can log error information to a file or program. On Unix systems, you can also log to the syslog daemon. On Windows, errors can be logged in the Windows event log and would then be viewable via the Windows Event Viewer. Use the ErrorLog directive to define where you want your logs to go.
Logging Errors to a File
A file argument indicates the path to the error log file. If the path is relative, it is assumed to be relative to the server root. By default, the error log file will be located in the logs directory and will be named error_log on Unix and error.log on Windows. The following is an example:
Logging Errors to a Program
The syslog Daemon Argument
On a Unix system, if you specify syslog as an argument, you can log error messages to the Unix system log daemon syslogd. By default, log errors are logged to the syslog facility local7. The facility is the part of the system generating the error. You can specify a facility by providing syslog: facility as an argument. Examples of syslog facilities are mail, uucp, local0, local1, and so on. For a complete list, look at the documentation for syslog included with your system (try man syslogd or man syslogd.conf at the command line). The following is an example of logging to syslog:
The LogLevel Directive
The error information provided by Apache has several degrees of importance. You can choose to log only important messages and disregard informational or trivial warning messages. The LogLevel directive takes an error-level argument. Only errors of that level of importance or higher will be logged.
Table 25.2 specifies the valid values for the LogLevel directive, as specified by the Apache documentation. By default, the LogLevel value is warn. That should be enough for most Apache installations. If you are trying to troubleshoot a specific configuration, you can alter the level to debug.