[ 
https://issues.apache.org/jira/browse/CXF-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16243967#comment-16243967
 ] 

Anton Johansson commented on CXF-7389:
--------------------------------------

Hey again!

I noticed there are a couple of other classes that also log this as warnings. 
Not sure why I didn't notice them earlier, but they are:

* 
[JAXRSInInterceptor.java|https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java#L166]
* 
[WebApplicationExceptionMapper.java|https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/WebApplicationExceptionMapper.java#L72]

The last one, I can override by setting printStackTrace to false. However, that 
would reduce all kinds of logs to FINE instead of WARNING. I only want to 
reduce 404's. Or maybe I want to avoid all logs here, I don't know. What's the 
idea behind it? Maybe it's not really informative to do this for any of these 
errors. Most of these seem to be ClientErrorExceptions, which is really out of 
our control. Then we have a few ServerErrorExceptions, but I don't think we get 
any of these, really. The times we want to show a 500, we do that ourselves. So 
maybe the mapper one isn't such a big deal. The JAXRSInInterceptor is harder to 
control...

> JAXRSUtils warning logs
> -----------------------
>
>                 Key: CXF-7389
>                 URL: https://issues.apache.org/jira/browse/CXF-7389
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Anton Johansson
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 3.0.15, 3.1.13, 3.2.0
>
>
> We're running a REST API service using CXF. We've got a dashboard with all 
> warning and error logs that we frequently use, and this dashboard includes 
> 404's that clients get when communicating with our API. We do not log WARN or 
> ERROR any other errors from the 400-series, because it's in theory the 
> clients fault and we can't do anything about it. We have now decided that we 
> want to stop logging WARN for these 404's.
> Our issue: We don't see any possible way to disable this log (or preferably 
> change it to INFO). It's logged from a static class, JAXRSUtils, see this 
> line:
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cxf/cxf-bundle-jaxrs/2.7.6/org/apache/cxf/jaxrs/utils/JAXRSUtils.java#501
> We could of course change the threshold to ERROR for this class, but I don't 
> want to lose the other INFO and WARN logs.
> I understand that this warning is great for clients, but I don't see it being 
> very useful for servers?
> Any tips or ideas about how we can disable this warning?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to