How to change time for the server.log file in the wildfly 9?

291 views Asked by At

I have installed the server wildfly 9 on Centos 7 and the time which is registered in server.log is one hour before. The timezone of Centos 7 is Europe/Athens (GMT +03:00) but the time in server.log is registered with timezone GMT +02:00.

Can anyone help me with this issue so that the time in server.log will be in timezone +03:00?

1

There are 1 answers

0
James R. Perkins On

You'll need to set the time zone for the date in the PATTERN formatter. The %z{ZONE_ID} is the pattern. An example in CLI would be:

/subsystem=logging/pattern-formatter=PATTERN:write-attribute(name=pattern, value="%z{Europe/Athens}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n")

Note that the time zone pattern needs to be placed before the date pattern.