settings: Define logging paths with, like, normal human variables.

This makes these variables available for type-checking.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-11-12 17:56:12 -08:00
committed by Tim Abbott
parent cafac83676
commit 6fe5e44b35
3 changed files with 33 additions and 36 deletions

View File

@@ -240,7 +240,7 @@ def log_to_file(logger: Logger,
filename: str,
log_format: str="%(asctime)s %(levelname)-8s %(message)s",
) -> None:
"""Note: `filename` should be declared in zproject/settings.py in ZULIP_PATHS."""
"""Note: `filename` should be declared in zproject/settings.py with zulip_path."""
formatter = logging.Formatter(log_format)
handler = logging.FileHandler(filename)
handler.setFormatter(formatter)