On 20.08.2012 21:46, John Byrne wrote:
I've tried both 7.0.29 and 7.0.8.

The feature wans introduced in 7.0.17. I tried your format string with current 7.0 head which should be identical to 7.0.29 w.r.t. access log and it did work for me. There were no changes in the (self-contained) access log valve code since March.

Make sure the versions didn't get mixed up. Check the version given in the log file during startup: "Starting Servlet Engine: ...".

2012/8/20 John Byrne <john_by...@apple.com>:


I was wondering if you could help me with a server.xml log question.  I'm 
trying to format the times that go into the logs but not having any success.  
The output always ends up as : ???.  I've read that any time format accepted by 
Java's SimpleDateFormat will work but this one doesn't seem to be working.

The time/date format is: %{yyyy-MM-dd'T'HH:mm:ss,SSSZ}t

The whole log format line is:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${splunk.accesslogs}" 
prefix="${serviceName}_${port.http.nonssl}_access_" suffix=".log" pattern="%{yyyy-MM-dd'T'HH:mm:ss,SSSZ}t thread=%I client=%a 
url=&quot;%r&quot; query=%q status=%s time=%D size=%B agent=&quot;%{User-Agent}i&quot;" resolveHosts="false" />

Everything works except the %{xxx}t "variable".
i.e. the output log line is:
??? thread="http-bio-26258"-exec-10 client=17.169.48.254 url="GET /iTranslate/index 
HTTP/1.1" query= status=200 time=449 size=8205 agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 
10_7_4) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25"

(notice the ??? -- that's where the time/date formatted output should go.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to