
Chapter 4 Web Server Logging
If the %v (Host name) or %x (URL suffix) format specifier is present in a log file name format string, the following characters in the file name are replaced by an underscore symbol in the log configuration file name:
" * . / : < > ? \
Characters whose ASCII values lie in the range of
%<ASCII value of character in hexadecimal>.
For example, the character with ASCII value 22 is replaced by %16.
Caution: If the %v format specifier is present in a log file name format string, a separate file is opened for each virtual host. To ensure continuous logging, the maximum number of files that a process can have open should be sufficiently large. See your operating system documentation for a procedure to change the number of files that can be opened.
Creating Apache Log Formats
You can derive from the custom logs most of the log formats that Apache currently supports. The custom log formats that match Apache log formats are:
NCSA/combined: LogFormat custom %h %l %u [%t] "%r" %s %B "%{referer}i"
NCSA/Common: LogFormat custom %h %l %u [%t] "%r" %s %B
Referer Log: LogFormat custom "%{referer}i"
Useragent: LogFormat custom
Similarly, you can derive the other server log formats from the custom formats.
Sample Configuration File
Following is a sample configuration file:
##########
#This is the NSWL configuration file
#Only the default filter is active
#Remove leading # to activate other filters
##########
##########
#Default filter (default on)
#W3C Format logging, new file is created every hour or on reaching 10MB file size,
#and the file name is Exyymmdd.log
##########
Filter default begin default
logFormatW3C
logIntervalHourly
logFileSizeLimit 10
116