From 624efba2d5da5b99b1d67e56d36e20a30ffeee5e Mon Sep 17 00:00:00 2001 From: dotnet Date: Fri, 13 Oct 2023 14:22:44 -0400 Subject: [PATCH] Add timestamp to error reports. --- gelbooru_poster.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gelbooru_poster.py b/gelbooru_poster.py index 0b5bcff..d787b1b 100644 --- a/gelbooru_poster.py +++ b/gelbooru_poster.py @@ -278,7 +278,10 @@ def main(): # If error, print error and continue except Exception as e: + #Print time print("\n\n" + cfg_name + ": Error: ", file=log_file) + print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()), file=log_file) + print("\n\n", file=log_file) traceback.print_exc(file=log_file) continue