You'll need to use the CustomRequestLog class.
Know that the EXTENDED_NCSA_FORMAT is a format string that is hard coded to
...
%{client}a - %u %t "%r" %s %O "%{Referer}i" "%{User-Agent}i
The `%t` is the time/date format.
You can specify the syntax for that format, some examples:
%{EEE MMM dd HH:mm:ss zzz yyyy}t
%{EEE MMM dd HH:mm:ss zzz yyyy|EST}t
%{EEE MMM dd HH:mm:ss zzz yyyy|JST|ja}t
These are the time/date syntax ...
1) specified with default GMT timezone, and default locale - aka
TimeZone.getTimeZone("GMT") and Locale.getDefault()
2) specified with EST timezone, and default locale -
TimeZone.getTimeZone("EST"), and Locale.getDefault()
3) specified with JST timezone, and `ja` locale -
TimeZone.getTimeZone("JST"), and Locale.forLanguageTag("ja")
The default syntax, if unspecified by the `%t` tag is ...
dd/MMM/yyyy:HH:mm:ss ZZZ
Joakim Erdfelt / [email protected]
On Mon, Jul 24, 2023 at 5:48 AM jdison16--- via jetty-users <
[email protected]> wrote:
> Hello!
>
> I am using AbstractNCSARequestLog with setLogDateFormat("HH:mm:ss,SSS");
> to log in NCSA format with milliseconds.
>
> Now in recent versions of Jetty this class was deleted with suggestion to
> use CustomRequestLog with EXTENDED_NCSA_FORMAT.
>
> But it logs request time without millis.
>
> Is there any simple way to log milliseconds too without writing my own
> CustomRequestLog
> with almost the same content (and delete DateCache logic).
>
> Thanks in advance!
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users