Instead of using ex.printStackTrace(), use the SLF4j Logger method that
takes a Throwable.  i.e. change:

ex.printStackTrace();

to:

log.warn("Bad things afoot",ex);

  (*Chris*)

On Wed, May 30, 2012 at 9:19 AM, <[email protected]> wrote:

> Hello,
>
> Is there a way to configure logback to rouge Java exceptions to the log
> file?  I've got all my other messages going to my desired file successfully
> but exceptions still go to the console.
>
> Thanks!
> Greg
>
> "If I had asked my customers what they wanted, they would have said 'A
> faster horse'" -- Henry Ford
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> This e-mail message, including attachments, may contain confidential,
> proprietary, or export controlled information.
> Any unauthorized disclosure, distribution, or other use is prohibited,
> unless expressly authorized.
> If you receive this e-mail in error, please notify the sender, and delete
> all copies of the original message from your systems.
> _______________________________________________
> Logback-user mailing list
> [email protected]
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to