mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
logging: Pass more format arguments to logging.
Commit bdc365d0fe (#14852) missed this
because of https://github.com/returntocorp/semgrep/issues/831.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
824d97987b
commit
333f7d16c9
@@ -25,8 +25,8 @@ def run(args: List[str], dry_run: bool = False) -> str:
|
|||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
if p.returncode:
|
if p.returncode:
|
||||||
logger.error("Could not invoke %s\nstdout: %r\nstderror: %r"
|
logger.error("Could not invoke %s\nstdout: %r\nstderror: %r",
|
||||||
% (args[0], stdout, stderr))
|
args[0], stdout, stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return stdout.decode()
|
return stdout.decode()
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ try:
|
|||||||
# the Zulip user, and then unpack it from that directory, so that
|
# the Zulip user, and then unpack it from that directory, so that
|
||||||
# we can unpack using the Zulip user even if the original path was
|
# we can unpack using the Zulip user even if the original path was
|
||||||
# not readable by the Zulip user.
|
# not readable by the Zulip user.
|
||||||
logging.info("Archiving the tarball under %s" % (TARBALL_ARCHIVE_PATH,))
|
logging.info("Archiving the tarball under %s", TARBALL_ARCHIVE_PATH)
|
||||||
os.makedirs(TARBALL_ARCHIVE_PATH, exist_ok=True)
|
os.makedirs(TARBALL_ARCHIVE_PATH, exist_ok=True)
|
||||||
archived_tarball_path = os.path.join(TARBALL_ARCHIVE_PATH, os.path.basename(tarball_path))
|
archived_tarball_path = os.path.join(TARBALL_ARCHIVE_PATH, os.path.basename(tarball_path))
|
||||||
shutil.copy(tarball_path, archived_tarball_path)
|
shutil.copy(tarball_path, archived_tarball_path)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ os_version = distro_info['VERSION_ID']
|
|||||||
|
|
||||||
if (vendor, os_version) in UNSUPPORTED_DISTROS:
|
if (vendor, os_version) in UNSUPPORTED_DISTROS:
|
||||||
# Link to documentation for how to correctly upgrade the OS.
|
# Link to documentation for how to correctly upgrade the OS.
|
||||||
logging.critical("Unsupported platform: {} {}".format(vendor, os_version))
|
logging.critical("Unsupported platform: %s %s", vendor, os_version)
|
||||||
logging.info("Sorry! The support for your OS has been discontinued.\n"
|
logging.info("Sorry! The support for your OS has been discontinued.\n"
|
||||||
"Please upgrade your OS to a supported release first.\n"
|
"Please upgrade your OS to a supported release first.\n"
|
||||||
"See https://zulip.readthedocs.io/en/latest/production/"
|
"See https://zulip.readthedocs.io/en/latest/production/"
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ if tornado_processes > 1:
|
|||||||
# restarts. This also avoids behavior with restarting a whole
|
# restarts. This also avoids behavior with restarting a whole
|
||||||
# supervisord group where if any individual process is slow to
|
# supervisord group where if any individual process is slow to
|
||||||
# stop, the whole bundle stays stopped for an extended time.
|
# stop, the whole bundle stays stopped for an extended time.
|
||||||
logging.info("Restarting Tornado process on port %s" % (p,))
|
logging.info("Restarting Tornado process on port %s", p)
|
||||||
subprocess.check_call(["supervisorctl", "restart", "zulip-tornado:port-%s" % (p,)])
|
subprocess.check_call(["supervisorctl", "restart", "zulip-tornado:port-%s" % (p,)])
|
||||||
else:
|
else:
|
||||||
logging.info("Restarting Tornado process")
|
logging.info("Restarting Tornado process")
|
||||||
|
|||||||
Reference in New Issue
Block a user