From: Alexander Vasarab Date: Tue, 16 Feb 2021 05:31:46 +0000 (-0800) Subject: Add important info to stdout log output X-Git-Tag: v3.2.2^2~1^2~2 X-Git-Url: https://wylark.com/src/infoex-autowx.git/commitdiff_plain/d6d9704c1dace40549c97e3b20c2a2da8ce7ef73 Add important info to stdout log output --- 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