Skip to content

Commit 1e08f70

Browse files
author
Rory McCann
committed
Merge pull request amandasaurus#13 from walkerdb/patch-1
docs: add supported formatting options to readme
2 parents 7ad67a2 + 59514e2 commit 1e08f70

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

README.md

+48
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,54 @@ There is a at least one key/value in the returned dictionary for each apache log
5353

5454
The version numbers follow [Semantic Versioning](http://semver.org/).
5555

56+
57+
Supported values
58+
========
59+
```python
60+
'%a' # Remote IP-address
61+
'%A' # Local IP-address
62+
'%B' # Size of response in bytes, excluding HTTP headers.
63+
'%b' # Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent.
64+
'%D' # The time taken to serve the request, in microseconds.
65+
'%f' # Filename
66+
'%h' # Remote host
67+
'%H' # The request protocol
68+
'%k' # Number of keepalive requests handled on this connection. Interesting if KeepAlive is being used, so that, for example, a '1' means the first keepalive request after the initial one, '2' the second, etc...; otherwise this is always 0 (indicating the initial request). Available in versions 2.2.11 and later.
69+
'%l' # Remote logname (from identd, if supplied). This will return a dash unless mod_ident is present and IdentityCheck is set On.
70+
'%m' # The request method
71+
'%p' # The canonical port of the server serving the request
72+
'%P' # The process ID of the child that serviced the request.
73+
'%q' # The query string (prepended with a ? if a query string exists, otherwise an empty string)
74+
'%r' # First line of request
75+
'%R' # The handler generating the response (if any).
76+
'%s' # Status. For requests that got internally redirected, this is the status of the *original* request --- %>s for the last.
77+
'%t' # Time the request was received (standard english format)
78+
'%T' # The time taken to serve the request, in seconds.
79+
'%u' # Remote user (from auth; may be bogus if return status (%s) is 401)
80+
'%U' # The URL path requested, not including any query string.
81+
'%v' # The canonical ServerName of the server serving the request.
82+
'%V' # The server name according to the UseCanonicalName setting.
83+
'%X' # Connection status when response is completed:
84+
# X = connection aborted before the response completed.
85+
# + = connection may be kept alive after the response is sent.
86+
# - = connection will be closed after the response is sent.
87+
# (This directive was %c in late versions of Apache 1.3, but this conflicted with the historical ssl %{var}c syntax.)
88+
'%I' # Bytes received, including request and headers, cannot be zero. You need to enable mod_logio to use this.
89+
'%O' # Bytes sent, including headers, cannot be zero. You need to enable mod_logio to use this.
90+
91+
'%\{User-Agent\}i' # Special case of below, for matching just user agent
92+
'%\{[^\}]+?\}i' # The contents of Foobar: header line(s) in the request sent to the server. Changes made by other modules (e.g. mod_headers) affect this. If you're interested in what the request header was prior to when most modules would have modified it, use mod_setenvif to copy the header into an internal environment variable and log that value with the %\{VARNAME}e described above.
93+
94+
'%\{[^\}]+?\}C' # The contents of cookie Foobar in the request sent to the server. Only version 0 cookies are fully supported.
95+
'%\{[^\}]+?\}e' # The contents of the environment variable FOOBAR
96+
'%\{[^\}]+?\}n' # The contents of note Foobar from another module.
97+
'%\{[^\}]+?\}o' # The contents of Foobar: header line(s) in the reply.
98+
'%\{[^\}]+?\}p' # The canonical port of the server serving the request or the server's actual port or the client's actual port. Valid formats are canonical, local, or remote.
99+
'%\{[^\}]+?\}P' # The process ID or thread id of the child that serviced the request. Valid formats are pid, tid, and hextid. hextid requires APR 1.2.0 or higher.
100+
'%\{[^\}]+?\}t' # The time, in the form given by format, which should be in strftime(3) format. (potentially localized)
101+
'%\{[^\}]+?\}x' # Extension value, e.g. mod_ssl protocol and cipher
102+
```
103+
56104
Copyright
57105
=========
58106

0 commit comments

Comments
 (0)