Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include microsecond timestamps in log4j logging?

Tags:

log4j

logback

Is it possible to have microsecond level timestamps in log4j logging? This is on linux running Java 1.6.

We have a couple servers right next to each other (synced via LAN to the same NTP server), and I'd like to have microseconds in the log lines.

If log4j doesn't offer this, does logback?

like image 984
Ted Graham Avatar asked Oct 15 '22 08:10

Ted Graham


1 Answers

Log4j does not include microsecond precision timestamps. Logback does not currently include microsecond precision timestamps but future versions of logback probably will.

like image 171
Ceki Avatar answered Oct 18 '22 13:10

Ceki