Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove last usages of deprecated logging.warn method (#6314)
Browse files Browse the repository at this point in the history
* commit 'fe1f2b452':
  Remove last usages of deprecated logging.warn method (#6314)
  • Loading branch information
anoadragon453 committed Mar 16, 2020
2 parents 22f14ae + fe1f2b4 commit e163ffd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/6314.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Replace every instance of `logger.warn` method with `logger.warning` as the former is deprecated.
4 changes: 2 additions & 2 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def read_config(*args, callback=None):

# 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
2 changes: 1 addition & 1 deletion synapse/handlers/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def get_association(self, room_alias):
ignore_backoff=True,
)
except CodeMessageException as e:
logging.warn("Error retrieving alias")
logging.warning("Error retrieving alias")
if e.code == 404:
result = None
else:
Expand Down

0 comments on commit e163ffd

Please sign in to comment.