Linc Linc - 1 year ago 84
Java Question

How do you write a full stack trace to the log?

I was catching an exception and trying to write the stack trace to the logs like this:


But all it said was


So I changed it to


And now it says only


How do I write the full stack trace to the log so I can see where this Exception is being generated in the app?

Answer Source


log.warn("message", e);

But it depends on your logging framework too.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download