logging: Show timestamp in UTC in non-django production scripts.

Done in pair programming with @aero31aero.

Fixes #9678.
This commit is contained in:
Abhilash Verma
2018-08-12 05:26:58 +05:30
committed by Tim Abbott
parent 920ef2b7f7
commit 0e2322a322
7 changed files with 12 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import configparser
import sys
import subprocess
import logging
import time
config_file = configparser.RawConfigParser()
config_file.read("/etc/zulip/zulip.conf")
@@ -24,6 +25,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, make_deploy_path, \
get_deployment_lock, release_deployment_lock, su_to_zulip
logging.Formatter.converter = time.gmtime
logging.basicConfig(format="%(asctime)s upgrade-zulip-from-git: %(message)s",
level=logging.INFO)