| Index | Alphabetical Index |
| Option Name: | logformat |
|---|---|
| Replaces: | |
| Requires: | |
| Default Value: | none |
| Suggested Config: |
|
Usage:
logformat <name> <format specification>
Defines an access log format.
The <format specification> is a string with embedded % format codes
% format codes all follow the same basic structure where all but
the formatcode is optional. Output strings are automatically escaped
as required according to their context and the output format
modifiers are usually not needed, but can be specified if an explicit
output format is desired.
% ["|[|'|#] [-] [[0]width] [{argument}] formatcode
" output in quoted string format
[ output in squid text log format as used by log_mime_hdrs
# output in URL quoted format
' output as-is
- left aligned
width field width. If starting with 0 the
output is zero padded
{arg} argument such as header name etc
Format codes:
>a Client source IP address
>A Client FQDN
>p Client source port
<A Server IP address or peer name
la Local IP address (http_port)
lp Local port number (http_port)
ts Seconds since epoch
tu subsecond time (milliseconds)
tl Local time. Optional strftime format argument
default %d/%b/%Y:%H:%M:%S %z
tg GMT time. Optional strftime format argument
default %d/%b/%Y:%H:%M:%S %z
tr Response time (milliseconds)
>h Request header. Optional header name argument
on the format header[:[separator]element]
<h Reply header. Optional header name argument
as for >h
un User name
ul User name from authentication
ui User name from ident
us User name from SSL
ue User name from external acl helper
Hs HTTP status code
Ss Squid request status (TCP_MISS etc)
Sh Squid hierarchy status (DEFAULT_PARENT etc)
mt MIME content type
rm Request method (GET/POST etc)
ru Request URL
rv Request protocol version
ea Log string returned by external acl
<st Reply size including HTTP headers
>st Request size including HTTP headers
st Request+Reply size including HTTP headers
% a literal % character
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
|
|
| Index | Alphabetical Index |