Log exceptions with stacktraces as ERROR instead of WARN

Description

log4j definitions:

The WARN level designates potentially harmful situations.

he ERROR level designates error events that might still allow the application to continue running.

Using log4j.properties, we're able to send a certain threshold to centralized exception reporting tools like Sentry.

Many Sakai stacktraces are sent with a WARN instead of ERROR. My argument is that if we are sending a stacktrace, it should be an ERROR. If we are catching something we know can go wrong, then let's just WARN about what happened without a stacktrace.

Environment

None

Test Plan

None

Activity

Matthew Buckett July 10, 2015 at 11:39 AM

You can use a log4j filter to only allow through logging events that have exceptions associated with them.
I don't think there is a one out of the box but it's trivial to write.

I'm not saying that these exceptions shouldn't be logged at error rather than warn level, but I haven't had a thorough look.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created July 8, 2015 at 12:40 PM
Updated July 28, 2015 at 10:05 AM
Resolved July 24, 2015 at 3:43 AM