mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-12-17 23:07:56 +00:00
Lower the logging level of some log calls
This commit is contained in:
parent
043734f02b
commit
d53e1c235b
@ -540,7 +540,7 @@ class Client(Methods):
|
||||
pts_count = getattr(update, "pts_count", None)
|
||||
|
||||
if isinstance(update, raw.types.UpdateChannelTooLong):
|
||||
log.warning(update)
|
||||
log.info(update)
|
||||
|
||||
if isinstance(update, raw.types.UpdateNewChannelMessage) and is_min:
|
||||
message = update.message
|
||||
|
@ -91,7 +91,7 @@ class TCP:
|
||||
self.writer.close()
|
||||
await asyncio.wait_for(self.writer.wait_closed(), TCP.TIMEOUT)
|
||||
except Exception as e:
|
||||
log.warning("Close exception: %s %s", type(e).__name__, e)
|
||||
log.info("Close exception: %s %s", type(e).__name__, e)
|
||||
|
||||
async def send(self, data: bytes):
|
||||
async with self.lock:
|
||||
@ -100,7 +100,7 @@ class TCP:
|
||||
self.writer.write(data)
|
||||
await self.writer.drain()
|
||||
except Exception as e:
|
||||
log.warning("Send exception: %s %s", type(e).__name__, e)
|
||||
log.info("Send exception: %s %s", type(e).__name__, e)
|
||||
raise OSError(e)
|
||||
|
||||
async def recv(self, length: int = 0):
|
||||
|
@ -41,7 +41,7 @@ class Terminate:
|
||||
|
||||
if self.takeout_id:
|
||||
await self.invoke(raw.functions.account.FinishTakeoutSession())
|
||||
log.warning("Takeout session %s finished", self.takeout_id)
|
||||
log.info("Takeout session %s finished", self.takeout_id)
|
||||
|
||||
await self.storage.save()
|
||||
await self.dispatcher.stop()
|
||||
|
@ -63,7 +63,7 @@ class Start:
|
||||
|
||||
if not await self.storage.is_bot() and self.takeout:
|
||||
self.takeout_id = (await self.invoke(raw.functions.account.InitTakeoutSession())).id
|
||||
log.warning("Takeout session %s initiated", self.takeout_id)
|
||||
log.info("Takeout session %s initiated", self.takeout_id)
|
||||
|
||||
await self.invoke(raw.functions.updates.GetState())
|
||||
except (Exception, KeyboardInterrupt):
|
||||
|
@ -131,7 +131,7 @@ class HTML:
|
||||
for tag, entities in parser.tag_entities.items():
|
||||
unclosed_tags.append(f"<{tag}> (x{len(entities)})")
|
||||
|
||||
log.warning("Unclosed tags: %s", ", ".join(unclosed_tags))
|
||||
log.info("Unclosed tags: %s", ", ".join(unclosed_tags))
|
||||
|
||||
entities = []
|
||||
|
||||
|
@ -229,7 +229,7 @@ class Session:
|
||||
raise SecurityCheckMismatch("The msg_id belongs to over 300 seconds in the past. "
|
||||
"Most likely the client time has to be synchronized.")
|
||||
except SecurityCheckMismatch as e:
|
||||
log.warning("Discarding packet: %s", e)
|
||||
log.info("Discarding packet: %s", e)
|
||||
await self.connection.close()
|
||||
return
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user