如何在Java日志记录中格式化日期? [英] How to format date in java logging?
本文介绍了如何在Java日志记录中格式化日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用:
log.info("Message");
,输出为:
Jul 8, 2014 12:58:02 PM myclass main
INFO: message
我如何只打印不带日期和INFO的消息??
How do i just print the message without the date and INFO: ?
推荐答案
更改
或在 logging.properties : All of these properties are documented in the format method. 这篇关于如何在Java日志记录中格式化日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!java.util.logging.SimpleFormatter.format=%2$s: %5$s%6$s%n
查看全文