简体   繁体   English

如何在Apache Wink Web服务中为Wink类打开调试日志记录?

[英]How do I turn debug logging on for Wink classes in an Apache Wink web service?

I have a web service built on Apache Wink (1.1.3), running under Tomcat, started from Eclipse for debugging. 我有一个基于Apache Wink(1.1.3)构建的Web服务,该服务在Tomcat下运行,从Eclipse开始进行调试。 How do I turn full logging on for some Wink classes? 如何打开某些Wink类的完整日志?

For a start, I just tried turning it on for all of Wink with these lines in the logging.properties file of the Tomcat conf directory: 首先,我只是尝试通过Tomcat conf目录的logging.properties文件中的以下行为所有Wink启用它:

org.apache.wink.level = FINEST
org.apache.wink.handlers = java.util.logging.ConsoleHandler

I also tried putting these lines in another file and referencing that file with -Djava.util.logging.config.file=.... Neither of these worked. 我还尝试将这些行放在另一个文件中,并使用-Djava.util.logging.config.file=....引用该文件。这两个都-Djava.util.logging.config.file=....

Apache Wink uses slf4j for logging. Apache Wink使用slf4j进行日志记录。 Meaning you should configure it with your favorite logger. 意味着您应该使用自己喜欢的记录器对其进行配置。
For example adding slf4j-jdk14.jar to your classpath will send the logs to the JDK's native logger. 例如,将slf4j-jdk14.jar添加到类路径会将日志发送到JDK的本机记录器。

I suggest you read the slf4j two pages manual . 我建议您阅读slf4j两页手册

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM