Improve logging, fix small issues

This commit is contained in:
2021-03-28 15:58:07 +02:00
parent cd053bc74e
commit 210c03b73f
10 changed files with 58 additions and 60 deletions

View File

@@ -26,9 +26,9 @@ def main():
try:
main()
except UnhandledHTTPCode as e:
print(f"[{e.status_code}] {e.cause}:\r\n{e.headers}")
logging.info(f"[{e.status_code}] {e.cause}:\r\n{e.headers}")
sys.exit(2)
except Exception as e:
print("[ABRT] Internal error: " + str(e), file=sys.stderr)
logging.info("[ABRT] Internal error: %s", e)
logging.debug("Internal error", exc_info=e)
sys.exit(1)