From: rjung
- There is also support to write information from the cookie, incoming
- header, the Session or something else in the ServletRequest.
+ There is also support to write information incoming or outgoing
+ headers, cookies, session or request attributes and special
+ timestamp formats.
It is modeled after the apache syntax:
%{xxx}i for incoming headers%{xxx}c for a specific cookie%{xxx}r xxx is an attribute in the ServletRequest%{xxx}s xxx is an attribute in the HttpSession%{xxx}t xxx is an enhanced SimpleDateFormat pattern
All formats supported by SimpleDateFormat are allowed in %{xxx}t.
+ In addition the following extensions have been added:
+
sec - number of seconds since the epochmsec - number of milliseconds since the epochmsec_frac - millisecond fractionFurthermore one can define whether to log the timestamp for the request start + time or the response finish time: +
begin or prefix begin: chooses
+ the request start timeend or prefix end: chooses
+ the response finish time%{xxx}t tokens to the pattern, one can
+ also log both timestamps.
- The shorthand pattern name common (which is also the
- default) corresponds to '%h %l %u %t "%r" %s %b'.
The shorthand pattern pattern="common"
+ corresponds to the Common Log Format defined by
+ '%h %l %u %t "%r" %s %b'.
The shorthand pattern name combined appends the
- values of the Referer and User-Agent headers,
- each in double quotes, to the common pattern
- described in the previous paragraph.
The shorthand pattern pattern="combined"
+ appends the values of the Referer and User-Agent
+ headers, each in double quotes, to the common pattern.