我在 WebLogic 中使用 JAX-WS,我能够通过使用以下参数(在 https://metro.java.net/guide/ch02.html#logging 中指定)启用消息日志记录:
com.sun.xml.ws.transport.http.HttpAdapter.dump=true
com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
然而,日志条目不包含任何时间戳,所以我几乎没有关于每条消息何时收到/发送的信息。
有什么方法可以将时间戳添加到生成的日志条目中吗?
最佳答案
我猜你需要配置日志消息格式:
java.util.logging.SimpleFormatter.format="%4$s: %5$s [%1$tc]%n
可以在此处找到有关配置选项的更多信息:
http://docs.oracle.com/javase/7/docs/api/java/util/logging/SimpleFormatter.html
关于java - JAX-WS 日志记录和时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20104121/