diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-16 19:24:03 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-16 19:24:03 +0000 |
commit | e163ffda2c78cd34873d8f382c7efa657cefb51e (patch) | |
tree | d4813685a361697a40685725892a16b3d02f4d57 | |
parent | Document lint.sh & allow application to specified files only (#6312) (diff) | |
parent | Remove last usages of deprecated logging.warn method (#6314) (diff) | |
download | synapse-e163ffda2c78cd34873d8f382c7efa657cefb51e.tar.xz |
Remove last usages of deprecated logging.warn method (#6314)
* commit 'fe1f2b452': Remove last usages of deprecated logging.warn method (#6314)
-rw-r--r-- | changelog.d/6314.misc | 1 | ||||
-rw-r--r-- | synapse/config/logger.py | 4 | ||||
-rw-r--r-- | synapse/handlers/directory.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/changelog.d/6314.misc b/changelog.d/6314.misc new file mode 100644 index 0000000000..2369760272 --- /dev/null +++ b/changelog.d/6314.misc @@ -0,0 +1 @@ +Replace every instance of `logger.warn` method with `logger.warning` as the former is deprecated. \ No newline at end of file diff --git a/synapse/config/logger.py b/synapse/config/logger.py index 2d2c1e54df..75bb904718 100644 --- a/synapse/config/logger.py +++ b/synapse/config/logger.py @@ -234,8 +234,8 @@ def setup_logging( # make sure that the first thing we log is a thing we can grep backwards # for - logging.warn("***** STARTING SERVER *****") - logging.warn("Server %s version %s", sys.argv[0], get_version_string(synapse)) + logging.warning("***** STARTING SERVER *****") + logging.warning("Server %s version %s", sys.argv[0], get_version_string(synapse)) logging.info("Server hostname: %s", config.server_name) return logger diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index 526379c6f7..c4632f8984 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -250,7 +250,7 @@ class DirectoryHandler(BaseHandler): ignore_backoff=True, ) except CodeMessageException as e: - logging.warn("Error retrieving alias") + logging.warning("Error retrieving alias") if e.code == 404: result = None else: |