tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Byrne <john_by...@apple.com>
Subject %{xxx}t not working
Date Mon, 20 Aug 2012 19:17:26 GMT


> 
> Hello Tomcat List,
> 
> 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.
> 
> 
> Can any one help me with this?
> Thank you,
> John
> 
> John Byrne
> System Administrator, IS&T
> john_byrne@apple.com
> 
> 
> 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message