2

By default, Jenkins' main log contains timestamps like the following:

Sep 26, 2014 7:03:00 PM hudson.triggers.SCMTrigger$Runner run
INFO: SCM changes detected in main-web-flow. Triggering  #613

I would prefer the time to be in 24-hour format, which is more readable (especially as my Jenkins Master is in a different time zone to myself). How/Where do I change this?

RCross
  • 469
  • 2
  • 6
  • 19

1 Answers1

0

You need to pass the java.util.logging.SimpleFormatter.format property to the jvm running jenkins, which is using java.util.loggin, like in (for YYYY-mm-dd):

java -Djava.util.logging.SimpleFormatter.format="[%1$Tf] %4$s: %2$s - %5$s %6$s%n"

You can find documentation on how to build the format string in the javadocs; while 1$, 2$,... are placeholders for the values passed in to the logger.

guido
  • 121
  • 5