我正在访问部署在其他使用 axis2 实现的远程机器上的网络服务。 我使用 cxf 创建了一个 webesrvice,它又调用了我上面提到的另一个 wesbervice。 当我在 tomcat 上部署我的 war 文件时,我在控制台上收到所有 soap 消息,并且它被所有日志覆盖。我想禁用 DEBUG 语句。
有什么办法可以改变吗?我是否需要修改运行 axis webservice 的远程服务器中的某些内容(我的 cxf webservice 正在使用的服务器)。 我得到如下调试语句。
pache.axis.message.MessageElement:trustLevelMap
2011-07-22 12:56:56 DeserializationContext [DEBUG] Exit: DeserializationContext:
:endElement()
2011-07-22 12:56:56 DeserializationContext [DEBUG] Enter: DeserializationContext
::endElement(, trustLevelMap)
2011-07-22 12:56:56 ProjectResourceBundle [DEBUG] org.apache.axis.i18n.resource:
:handleGetObject(popHandler00)
2011-07-22 12:56:56 DeserializationContext [DEBUG] Popping handler org.apache.ax
is.message.SOAPHandler@6961fdd9
2011-07-22 12:56:56 DeserializationContext [DEBUG] Popped element stack to org.a
pache.axis.message.MessageElement:navigation
2011-07-22 12:56:56 DeserializationContext [DEBUG] Exit: DeserializationContext:
:endElement()
除此之外,我还想将我的 cxf 日志级别从调试更改为信息。请给我一些指示。
最佳答案
找到 log4j.properties
文件。
添加
log4j.logger.org.apache.axis=ERROR
对于 log4j.xml
- 不知道语法?
见:
http://ws.apache.org/axis/java/developers-guide.html#Logging/Tracing和 http://ws.apache.org/axis/java/developers-guide.html#TurningOnDebugOutput
(我回答这个问题的时间比被问到的时间晚得多,因为当我想知道同样的事情时我发现了这个问题)
关于java - 更改 AXIS 和 cxf web 服务的日志级别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6787000/