How to include time format with millisecond precision in Apache Access Log.
I tried to use:
pattern="%h %l %u %{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t "%r" %s %b".
However it does not work.
How to include time format with millisecond precision in Apache Access Log.
I tried to use:
pattern="%h %l %u %{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t "%r" %s %b".
However it does not work.
From the AccessLogValve
documentation
%{xxx}t xxx is an enhanced SimpleDateFormat pattern
So if you use a pattern of something like %{yyyy-MM-dd HH:mm:ss.SSS}t
then it should print milliseconds.
Apache access logs accept time format with sfrtime format from C standard library. Try something like that:
%{%Y-%m-%d %H:%M:%S.%f}t