Skip to content

Commit

Permalink
Improve error logging format
Browse files Browse the repository at this point in the history
For what its worth I guess
  • Loading branch information
imayhaveborkedit committed Sep 8, 2017
1 parent 810536c commit 0d30aeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import time
import traceback

from threading import Lock
Expand All @@ -13,8 +14,9 @@
def exhook(*args):
with l:
with open("error.txt", 'a') as f:
f.write(f"{'#' * 20} {time.asctime()} {'#' * 20}\n")
f.writelines(traceback.format_exception(*args))
f.write('\n')
f.write('\n\n')

ui.on_error(*args)

Expand Down

0 comments on commit 0d30aeb

Please sign in to comment.