Skip to Main Content
Apache 2 Pocket Reference
book

Apache 2 Pocket Reference

by Andrew Ford
October 2008
Intermediate to advanced content levelIntermediate to advanced
204 pages
3h 2m
English
O'Reilly Media, Inc.
Content preview from Apache 2 Pocket Reference

Chapter 11. Logging

There are two main aspects to logging: recording information about errors and other significant events, and tracking accesses to the web pages served. Other types of log information are more specialized, such as scripting, rewriting, and SSL.

On a busy server, log files grow rapidly and can be rotated in the following ways. You can either rename the current files and restart Apache so that it creates new files. Or you can pipe the log output through an external program that manages log rotation, such as the rotatelogs program included in the standard distribution or cronolog (http://cronolog.org/)—a popular, more sophisticated alternative.

Error Logging

Errors and other conditions are recorded to the error log, support for which is provided by the core. The mod_dumpio module adds the facility to record the data received and transmitted by Apache to the error log, which is useful for debugging.

ErrorLog

SV

core

logs/error_log

ErrorLog { filename | "|command" | syslog[:facility] }

Specifies the file for logging error messages. If the argument starts with a pipe character (|), then it is taken as an executable file that is spawned and passed error messages on its standard input.

LogLevel

SV

core

error

LogLevel level

Controls the verbosity of error logging. Messages will only be logged that are of a severity of level or higher. The log levels are listed in Table 11-1 in descending order of severity.

Table 11-1. Error log levels

Level

Description

emerg

Emergency conditions signifying ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Apache mod_rewrite

Learning Apache mod_rewrite

Daryl Wood
Sams Teach Yourself Apache 2 in 24 Hours

Sams Teach Yourself Apache 2 in 24 Hours

Daniel López Ridruejo, Ian Kallen

Publisher Resources

ISBN: 9780596154899Errata Page