Fix warning log calls

This commit is contained in:
Tulir Asokan
2019-08-09 22:58:56 +03:00
parent d354d6e788
commit 99e26a5805
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -83,8 +83,8 @@ class TelegramBridge(Bridge):
if prometheus:
prometheus.start_http_server(self.config["metrics.listen_port"])
else:
self.log.warn("Metrics are enabled in the config, "
"but prometheus_client is not installed.")
self.log.warning("Metrics are enabled in the config, "
"but prometheus_client is not installed.")
def prepare_bridge(self) -> None:
self.bot = init_bot(self.config)
+1 -1
View File
@@ -511,7 +511,7 @@ class PortalMetadata(BasePortal, ABC):
try:
await self.main_intent.kick_user(self.mxid, user.mxid, kick_message)
except MForbidden as e:
self.log.warn(f"Failed to kick {user.mxid}: {e}")
self.log.warning(f"Failed to kick {user.mxid}: {e}")
async def update_info(self, user: 'AbstractUser', entity: TypeChat = None) -> None:
if self.peer_type == "user":
+1 -1
View File
@@ -321,7 +321,7 @@ class User(AbstractUser):
archived=False):
entity = dialog.entity
if isinstance(entity, Chat) and (entity.deactivated or entity.left):
self.log.warn(f"Ignoring deactivated or left chat {entity} while syncing")
self.log.warning(f"Ignoring deactivated or left chat {entity} while syncing")
continue
elif isinstance(entity, TLUser) and not config["bridge.sync_direct_chats"]:
continue