mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Add timestamp to log output
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ if __name__ == "__main__":
|
||||
root.setLevel(LOG_LEVEL)
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
handler.setLevel(LOG_LEVEL)
|
||||
formatter = logging.Formatter("%(levelname)s : %(message)s")
|
||||
formatter = logging.Formatter("%(asctime)s | %(levelname)7s | %(message)s", "%Y-%m-%d %H:%M:%S")
|
||||
handler.setFormatter(formatter)
|
||||
root.handlers.clear()
|
||||
root.addHandler(handler)
|
||||
|
||||
Reference in New Issue
Block a user