The access log formatting variables follow the Apache variables:
%b | result content length |
%D | time taken to complete the request in microseconds (since 3.0.16) |
%h | remote IP addr |
%{xxx}i | request header xxx |
%{xxx}o | response header xxx |
%{xxx}c | cookie value xxx |
%n | request attribute |
%r | request URL |
%s | status code |
%{xxx}t | request date with optional time format string. |
%T | time taken to complete the request in seconds |
%u | remote user |
%U | request URI |
%v | name of the virtual host serving the request |
The default format is:
default access log format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\""
Timestamp format string
The timestamp for log tags is a format string which can contain percent codes which are substituted with time and date values.
%a | day of week (short) |
%A | day of week (verbose) |
%b | day of month (short) |
%B | day of month (verbose) |
%c | Java locale date |
%d | day of month (two-digit) |
%H | 24-hour (two-digit) |
%I | 12-hour (two-digit) |
%j | day of year (three-digit) |
%m | month (two-digit) |
%M | minutes |
%p | am/pm |
%S | seconds |
%s | milliseconds |
%W | week in year (three-digit) |
%w | day of week (one-digit) |
%y | year (two-digit) |
%Y | year (four-digit) |
%Z | time zone (name) |
%z | time zone (+/-0800) |
Example: typical timestamp for the log tag
<resin
xmlns="http://caucho.com/ns/resin">
<log-handler name=‘‘ path=‘stderr:‘ timestamp="[%H:%M:%S.%s]"/>
...
</resin>
<log-handler name=‘‘ path=‘stderr:‘ timestamp="[%H:%M:%S.%s]"/>
...
</resin>