Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Blank Fatal Messages #73

Open
MADiep opened this issue Jun 24, 2016 · 1 comment
Open

Blank Fatal Messages #73

MADiep opened this issue Jun 24, 2016 · 1 comment

Comments

@MADiep
Copy link

MADiep commented Jun 24, 2016

Sometimes a FATAL log event will have no message, leaving the user completely in the dark of the cause of the error. This is caused by the use of the Throwable.getMessage() method. Because a Throwable is not guaranteed to have a message, it simply produces an empty message.

Changing these instances to use toString() will at minimum show the exception type. Alternatively, JTAF can also check if the message is null or empty and fall back to toString().

@mmlinford
Copy link
Contributor

What about using org.apache.log4j.Category.fatal(Object, Throwable) instead and add new messages where necessary? It looks it's meant for exactly this situation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants