From 509e4ce2c1424b8bd6cf67affef79ec7f2ffc7dc Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Thu, 11 Mar 2021 10:05:30 +0900 Subject: [PATCH] Log local timezone if available --- pyls/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyls/__main__.py b/pyls/__main__.py index 6440085f..2b5ca5b5 100644 --- a/pyls/__main__.py +++ b/pyls/__main__.py @@ -3,6 +3,7 @@ import logging import logging.config import sys +import time try: import ujson as json @@ -12,7 +13,8 @@ from .python_ls import (PythonLanguageServer, start_io_lang_server, start_tcp_lang_server) -LOG_FORMAT = "%(asctime)s UTC - %(levelname)s - %(name)s - %(message)s" +LOG_FORMAT = "%(asctime)s {0} - %(levelname)s - %(name)s - %(message)s".format( + time.localtime().tm_zone if sys.version_info >= (3, 3) else "") def add_arguments(parser):