LogFormat

Name

LogFormat -- Specify a logging format

Synopsis

LogFormat [ LogFormat nickname "format-string"]

Default

LogFormat default "%h %l %u %t \"%r\" %s %b"

Context

server config

Module

mod_log

Compatibility

1.1.6pl1 and later

Description

The LogFormat directive can be used to create a custom logging format for use with the ExtendedLog directive. Once created, the format can be referenced by the specified nickname. The format-string argument can consist of any combination of letters, numbers and symbols. The special character % is used to start a meta-sequence (see below). To insert a literal % character, use %%.

The following meta sequences are available and are replaced as indicated when logging. %a   Remote client IP address %A   Anonymous username (password given), or UNKNOWN if non-anonymous %b   Bytes sent for request %d Directory name (not full path) for CDUP, CWD, MKD, RMD, XCWD, XCUP, XMKD, XRMD   %D Directory name (full path) for CDUP, CWD, MKD, RMD, XCWD, XCUP, XMKD, XRMD   %{FOOBAR}e   Contents of environment variable FOOBAR. Note that the server does not set any environment variables itself. %f   Filename stored or retrieved, absolute path (not chrooted) %F   Filename stored or retrieved, as the client sees it %h   Remote client DNS name %l   Remote username (from ident), or UNKNOWN if ident lookup failed %L   Local server IP address %m   Command (method) name received from client, e.g., RETR %p   Local server port number %P   Local server process id (pid) %r   Full command line received from client %s   Numeric FTP response code (status) %t   Current local time %{format}t   Current local time formatted (strftime(3) format) %T   Time taken to transmit/receive file, in seconds %u   Local authenticated userid %U   USER name originally sent by the client %v   ServerName of server handling session %V   DNS name of server handling session

See also

ExtendedLog, TransferLog

Examples

Рейтинг@Mail.ru