Error objects include useful information like stacktraces which can greatly help in diagnosing problems. We should always include those as separate arguments in the log messages and leave the formatting to the log framework / appender otherwise we lose the stacktrace information.
Error objects include useful information like stacktraces which can greatly help in diagnosing problems. We should always include those as separate arguments in the log messages and leave the formatting to the log framework / appender otherwise we lose the stacktrace information.