You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2015/07/02 20:46:59 UTC
access log valve with custom format
Hi guys,
access log valve documents you can use %t{simple date format}:
* <li><b>%t{format}</b> - Date and time, in any format supported by
SimpleDateFormat
but actually the way the parsing is done (checked on 7.0.61 but seems the
same code on dev ones - 7 and 8) it is %{format}t
typo?
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
Re: access log valve with custom format
Posted by Romain Manni-Bucau <rm...@gmail.com>.
the javadoc:
https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/AccessLogValve.html
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
2015-07-02 11:54 GMT-07:00 Christopher Schultz <chris@christopherschultz.net
>:
> Romain,
>
> On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
> > access log valve documents you can use %t{simple date format}:
> >
> > * <li><b>%t{format}</b> - Date and time, in any format supported by
> > SimpleDateFormat
> >
> > but actually the way the parsing is done (checked on 7.0.61 but seems the
> > same code on dev ones - 7 and 8) it is %{format}t
> >
> > typo?
>
> Which document are you looking at?
>
>
> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
> and
> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
>
> both agree that "%{xxx}t" is the right pattern to use.
>
> -chris
>
>
Re: access log valve with custom format
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Romain,
On 7/2/15 3:02 PM, Romain Manni-Bucau wrote:
> Thanks! Yes now there is AbstractAccessLogValve but was not in v7.
Fixed in all 7/8/trunk.
-chris
> 2015-07-02 12:00 GMT-07:00 Christopher Schultz <chris@christopherschultz.net
>> :
>
>> Romain,
>>
>> On 7/2/15 2:54 PM, Christopher Schultz wrote:
>>> Romain,
>>>
>>> On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
>>>> access log valve documents you can use %t{simple date format}:
>>>>
>>>> * <li><b>%t{format}</b> - Date and time, in any format supported by
>>>> SimpleDateFormat
>>>>
>>>> but actually the way the parsing is done (checked on 7.0.61 but seems
>> the
>>>> same code on dev ones - 7 and 8) it is %{format}t
>>>>
>>>> typo?
>>>
>>> Which document are you looking at?
>>>
>>>
>>> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
>>> and
>>> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
>>>
>>> both agree that "%{xxx}t" is the right pattern to use.
>>
>> Aah, it's in AbstractAccessLogValve. Yes, it's a typo in the Javadoc.
>>
>> I've fixed trunk in r1688885. I'll back-port to Tomcat 8, 7.
>>
>> -chris
>>
>>
>
Re: access log valve with custom format
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Thanks! Yes now there is AbstractAccessLogValve but was not in v7.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
2015-07-02 12:00 GMT-07:00 Christopher Schultz <chris@christopherschultz.net
>:
> Romain,
>
> On 7/2/15 2:54 PM, Christopher Schultz wrote:
> > Romain,
> >
> > On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
> >> access log valve documents you can use %t{simple date format}:
> >>
> >> * <li><b>%t{format}</b> - Date and time, in any format supported by
> >> SimpleDateFormat
> >>
> >> but actually the way the parsing is done (checked on 7.0.61 but seems
> the
> >> same code on dev ones - 7 and 8) it is %{format}t
> >>
> >> typo?
> >
> > Which document are you looking at?
> >
> >
> > http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
> > and
> > http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
> >
> > both agree that "%{xxx}t" is the right pattern to use.
>
> Aah, it's in AbstractAccessLogValve. Yes, it's a typo in the Javadoc.
>
> I've fixed trunk in r1688885. I'll back-port to Tomcat 8, 7.
>
> -chris
>
>
Re: access log valve with custom format
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Romain,
On 7/2/15 2:54 PM, Christopher Schultz wrote:
> Romain,
>
> On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
>> access log valve documents you can use %t{simple date format}:
>>
>> * <li><b>%t{format}</b> - Date and time, in any format supported by
>> SimpleDateFormat
>>
>> but actually the way the parsing is done (checked on 7.0.61 but seems the
>> same code on dev ones - 7 and 8) it is %{format}t
>>
>> typo?
>
> Which document are you looking at?
>
>
> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
> and
> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
>
> both agree that "%{xxx}t" is the right pattern to use.
Aah, it's in AbstractAccessLogValve. Yes, it's a typo in the Javadoc.
I've fixed trunk in r1688885. I'll back-port to Tomcat 8, 7.
-chris
Re: access log valve with custom format
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Romain,
On 7/2/15 2:46 PM, Romain Manni-Bucau wrote:
> access log valve documents you can use %t{simple date format}:
>
> * <li><b>%t{format}</b> - Date and time, in any format supported by
> SimpleDateFormat
>
> but actually the way the parsing is done (checked on 7.0.61 but seems the
> same code on dev ones - 7 and 8) it is %{format}t
>
> typo?
Which document are you looking at?
http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
and
http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html
both agree that "%{xxx}t" is the right pattern to use.
-chris