cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exception stacktrace not added in cron job logs

former_member570877
Participant
0 Likes
408

Hi Experts,

We have a cron job with a few cases where an exception can occur. We are logging the exception using LOG4j

Logger is defined as:
private static final Logger LOG = Logger.getLogger(MyCronJob.class);

error logging is as follows:
LOG.error("Error occurred while processing raw csv : ", ioException);

Now, whenever an exception occurs and I check the logs, I can only see:

"Error occurred while processing raw csv :". No StackTrace included here.

As a workaround, If we change the log statement as below, it works: LOG.error("Error occurred while processing raw csv : " + ioException);

Please suggest the solution.

Thanks,
Vikram

Accepted Solutions (0)

Answers (0)