adding stacktrace to log messages

currently stacktraces appear in stdout as opposed to the log messages.