KB Article #177466

How to change the timestamp format in the access log

Problem

The Access Log timestamp by default appears in the middle of the line from the %t in the format string

%h %l %u %t "%r" %s %b

which writes to the access log a line similar to

support1.axway.com - - [13/Oct/2015:08:56:41 00] "POST /data/info.wso HTTP/1.0" 200 215

Resolution

The format and the position can be changed in the Server Settings through Policy Studio. The timestamp can be configured according to formats supported by SimpleDateFormat.

%t{format} - Date and time, in any format supported by SimpleDateFormat

Example format :-

%{"dd/MMM/yyyy ** HH:mm:ss:SSS Z"}t

which will give the time output below including milliseconds

["13/Oct/2015 ** 10:52:45:830 +0000"]

This can be combined with the other variables as defined in KB https://support.axway.com/kb/176899/language/en


NOTE: adjusting the timestamp for the access log is only possible in release 7.4.1 and there after.