Make sure formatting on error is more user friendly and newlines are
correctly replaced.
@@ -74,8 +74,10 @@ def main():
return _run_server()
except SystemExit as exit_code:
sys.exit(exit_code)
- except Exception:
- LOG.exception('(PID=%s) ST2 API quit due to exception.', os.getpid())
+ except Exception as e:
+ msg = getattr(e, 'message', str(e))
+ LOG.error('(PID=%s) ST2 API quit due to exception.', os.getpid())
+ LOG.error(msg)
return 1
finally:
_teardown()
