未记录Axis / Log4J FATAL消息

时间:2018-04-25 11:46:35

标签: java tomcat log4j axis

我正在尝试更改我的log4j设置以记录致命级别消息,但是我在日志中等待查看的一条消息并不会出现事件,尽管它似乎被标记为致命。

我的log4j.properties摘录:

### Setup Axis Log
log4j.logger.org.apache.axis=FATAL, AXISCONSOLE
log4j.additivity.org.apache.axis=false

log4j.appender.AXISCONSOLE=org.apache.log4j.RollingFileAppender
log4j.appender.AXISCONSOLE.File=D:/temp/debug/axis.log
log4j.appender.AXISCONSOLE.Append=true
log4j.appender.AXISCONSOLE.MaxFileSize=5000KB
log4j.appender.AXISCONSOLE.MaxBackupIndex=5
log4j.appender.AXISCONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.AXISCONSOLE.layout.ConversionPattern=%d [%t] AXIS %-5p %c - %m%n

当log4j设置为DEBUG时,错误是:

2018-04-25 12:38:15,232 [ajp-bio-8012-exec-1] AXIS DEBUG org.apache.axis.EXCEPTIONS - AxisFault:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 19; The prefix "ns0" for element "ns0:authToken" is not bound.
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 19; The prefix "ns0" for element "ns0:authToken" is not bound.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

我可以看到代码调用

 org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

但是,当AXIS设置为FATAL时,它似乎没有记录。我错过了什么?

0 个答案:

没有答案