Include microsecond timestamps in log4j logging?

寵の児 提交于 2019-12-23 11:44:53

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/2382763/include-microsecond-timestamps-in-log4j-logging

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!