1094 - shorter log messages for exceptions

Fix for #1094 

Full stacktraces should only show up in stdout in unittest builds.
Anything else should use e.toString() or "" if the exception is null.