From: Rich Bowen Specifying connection
or request
as first
parameter allows to specify additional formats, causing additional
information to be logged when the first message is logged for a specific
- connection or request, respectivly. This additional information is only
+ connection or request, respectively. This additional information is only
logged once per connection/request. If a connection or request is processed
without causing any log message, the additional information is not logged
either.
The above behaviour can be changed by adding modifiers to the format +
The above behavior can be changed by adding modifiers to the format
string item. A -
(minus) modifier causes a minus to be logged if the
respective item does not produce any output. In once-per-connection/request
formats, it is also possible to use the +
(plus) modifier. If an
@@ -1336,6 +1336,29 @@ in case of an error
message is not higher than the specified log severity level. The number can
range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).
Modified Token | Meaning |
---|---|
%-{Referer}i |
+ Logs a - if Referer is not set. |
+
%+{Referer}i |
+ Omits the entire line if Referer is not set. |
+
%4{Referer}i |
+ Logs the Referer only if the log message severity
+ is higher than 4. |
+
Some format string items accept additional parameters in braces.
%% |
The percent sign |
%...a |
+ |
%a |
Remote IP-address and port |
%...A |
+ |
%A |
Local IP-address and port |
%...{name}e |
+ |
%{name}e |
Request environment variable name |
%...E |
+ |
%E |
APR/OS error status code and string |
%...F |
+ |
%F |
Source file name and line number of the log call |
%...{name}i |
+ |
%{name}i |
Request header name |
%...k |
+ |
%k |
Number of keep-alive requests on this connection |
%...l |
+ |
%l |
Loglevel of the message |
%...L |
+ |
%L |
Log ID of the request |
%...{c}L |
+ |
%{c}L |
Log ID of the connection |
%...{C}L |
+ |
%{C}L |
Log ID of the connection if used in connection scope, empty otherwise |
%...m |
+ |
%m |
Name of the module logging the message |
%M |
The actual log message |
%...{name}n |
+ |
%{name}n |
Request note name |
%...P |
+ |
%P |
Process ID of current process |
%...T |
+ |
%T |
Thread ID of current thread |
%...{g}T |
+ |
%{g}T |
System unique thread ID of current thread (the same ID as
displayed by e.g. top ; currently Linux only) |
%...t |
+ |
%t |
The current time |
%...{u}t |
+ |
%{u}t |
The current time including micro-seconds |
%...{cu}t |
+ |
%{cu}t |
The current time in compact ISO 8601 format, including micro-seconds |
%...v |
+ |
%v |
The canonical |
%...V |
+ |
%V |
The server name of the server serving the request according to the
|