在我目前安裝一個彈簧CXF的JAX-RS的Servlet,異常被記錄到log4j的DEBUG道:如何讓CXF將異常記錄到ERROR通道?
DEBUG http-8134-2 org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper - WebApplicationException has been caught, status: 500, message: Unrecognized field "links" (Class Result), not marked as ignorable
at [Source: {"links"}; line: 1, column: 11] (through reference chain: bbc.news.naf.elections.data.model.client.Result["links"])
javax.ws.rs.WebApplicationException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "links" (Class Result), not marked as ignorable
at [Source: {"links":[{}; line: 1, column: 11] (through reference chain: bbc.news.naf.elections.data.model.client.Result["links"])
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:243)
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:89)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
顯然,這是不理想的。我如何讓CXF將這些異常堆棧跟蹤記錄到像WARN或ERROR等更相關的東西?