Escape error backtrace and type in log entries