From d6d9704c1dace40549c97e3b20c2a2da8ce7ef73 Mon Sep 17 00:00:00 2001 From: Alexander Vasarab Date: Mon, 15 Feb 2021 21:31:46 -0800 Subject: [PATCH] Add important info to stdout log output --- infoex-autowx.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infoex-autowx.py b/infoex-autowx.py index b663163..4f3e99a 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -155,6 +155,10 @@ def setup_logging(log_level): #LOG.addHandler(logging.handlers.SysLogHandler()) # fallback to stdout handler = logging.StreamHandler(sys.stdout) + formatter = logging.Formatter('%(asctime)s.%(msecs)03d ' + '%(levelname)s %(module)s - %(funcName)s: %(message)s', + '%Y-%m-%d %H:%M:%S') + handler.setFormatter(formatter) LOG.addHandler(handler) # ugly, but passable -- 2.30.2