You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ronald Pieterse <ro...@gmail.com> on 2007/10/29 11:13:33 UTC

Stack trace of custom exception visible on server

When I throw a custom exception from the server to the client the stack trace
also appears in the server logs. How can I stop that?
I just want to print out one line saying the exception is thrown - that's
all.
-- 
View this message in context: http://www.nabble.com/Stack-trace-of-custom-exception-visible-on-server-tf4710680.html#a13464546
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Stack trace of custom exception visible on server

Posted by Ronald Pieterse <ro...@gmail.com>.
Dudes, it is indeed good in 2.0.4. Excellent! Only one line of info visible
when throwing a custom exception.
Good job and thanks, guys!

Ronald


Ronald Pieterse wrote:
> 
> When I throw a custom exception from the server to the client the stack
> trace also appears in the server logs. How can I stop that?
> I just want to print out one line saying the exception is thrown - that's
> all.
> 

-- 
View this message in context: http://www.nabble.com/Stack-trace-of-custom-exception-visible-on-server-tp13464546p15286957.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Stack trace of custom exception visible on server

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 16 January 2008, Ronald Pieterse wrote:
> Unfortunately this doesn't work either. I use Log4J and tried to set
> the levels for the interceptor to FATAL even, but the exception gets
> logged on the server anyway.

Well, we don't use Log4j.   It would need to be java.util.logging 
configuration.  

That said, I'm making some changes to this for 2.0.4.   For 2.0.4 for 
checked application exceptions, it's just going to log something 
like "Application exception " + ex.getMessage() at INFO level. It will 
log the full stack trace at FINE level. 

For other exceptions, the current behavior will remain.

Dan


> This is very annoying. My testcases are flooded with exceptions.
> Has anyone even encountered this problem? Is it a bug? How would the
> formatter idea that was suggested before work anyway?
>
> dkulp wrote:
> > I don't think there is an (easy) way.
> >
> > With a logging.properties file, you could turn OFF the logging for
> > the org.apache.cxf.phase.PhaseInterceptorChain logger. (set level to
> > WARNING or similar)  Nothing would get logged then.
> >
> > The hard way would be to write a custom formatter that you would set
> > for that logger that would not log the stack trace.   That would
> > definitely suck.
> >
> > Dan
> >
> > On Wednesday 07 November 2007, Ronald Pieterse wrote:
> >> Anyone any ideas?
> >>
> >> Ronald Pieterse wrote:
> >> > When I throw a custom exception from the server to the client the
> >> > stack trace also appears in the server logs. How can I stop that?
> >> > I just want to print out one line saying the exception is thrown
> >> > - that's all.
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > daniel.kulp@iona.com
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: Stack trace of custom exception visible on server

Posted by Ronald Pieterse <ro...@gmail.com>.
Unfortunately this doesn't work either. I use Log4J and tried to set the
levels for the interceptor to FATAL even, but the exception gets logged on
the server anyway.
This is very annoying. My testcases are flooded with exceptions.
Has anyone even encountered this problem? Is it a bug? How would the
formatter idea that was suggested before work anyway?


dkulp wrote:
> 
> 
> I don't think there is an (easy) way.
> 
> With a logging.properties file, you could turn OFF the logging for the 
> org.apache.cxf.phase.PhaseInterceptorChain logger. (set level to WARNING 
> or similar)  Nothing would get logged then.
> 
> The hard way would be to write a custom formatter that you would set for 
> that logger that would not log the stack trace.   That would definitely 
> suck.
> 
> Dan
> 
> 
> 
> On Wednesday 07 November 2007, Ronald Pieterse wrote:
>> Anyone any ideas?
>>
>> Ronald Pieterse wrote:
>> > When I throw a custom exception from the server to the client the
>> > stack trace also appears in the server logs. How can I stop that? I
>> > just want to print out one line saying the exception is thrown -
>> > that's all.
> 
> 
> 
> -- 
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Stack-trace-of-custom-exception-visible-on-server-tp13464546p14877655.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Stack trace of custom exception visible on server

Posted by Daniel Kulp <dk...@apache.org>.
I don't think there is an (easy) way.

With a logging.properties file, you could turn OFF the logging for the 
org.apache.cxf.phase.PhaseInterceptorChain logger. (set level to WARNING 
or similar)  Nothing would get logged then.

The hard way would be to write a custom formatter that you would set for 
that logger that would not log the stack trace.   That would definitely 
suck.

Dan



On Wednesday 07 November 2007, Ronald Pieterse wrote:
> Anyone any ideas?
>
> Ronald Pieterse wrote:
> > When I throw a custom exception from the server to the client the
> > stack trace also appears in the server logs. How can I stop that? I
> > just want to print out one line saying the exception is thrown -
> > that's all.



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Stack trace of custom exception visible on server

Posted by Ronald Pieterse <ro...@gmail.com>.
Anyone any ideas?


Ronald Pieterse wrote:
> 
> When I throw a custom exception from the server to the client the stack
> trace also appears in the server logs. How can I stop that?
> I just want to print out one line saying the exception is thrown - that's
> all.
> 

-- 
View this message in context: http://www.nabble.com/Stack-trace-of-custom-exception-visible-on-server-tf4710680.html#a13637582
Sent from the cxf-user mailing list archive at Nabble.com.