Lower the logging level of some log calls

This commit is contained in:
Dan 2023-01-09 15:19:55 +01:00
parent 043734f02b
commit d53e1c235b
6 changed files with 7 additions and 7 deletions

View File

@ -540,7 +540,7 @@ class Client(Methods):
pts_count = getattr(update, "pts_count", None) pts_count = getattr(update, "pts_count", None)
if isinstance(update, raw.types.UpdateChannelTooLong): if isinstance(update, raw.types.UpdateChannelTooLong):
log.warning(update) log.info(update)
if isinstance(update, raw.types.UpdateNewChannelMessage) and is_min: if isinstance(update, raw.types.UpdateNewChannelMessage) and is_min:
message = update.message message = update.message

View File

@ -91,7 +91,7 @@ class TCP:
self.writer.close() self.writer.close()
await asyncio.wait_for(self.writer.wait_closed(), TCP.TIMEOUT) await asyncio.wait_for(self.writer.wait_closed(), TCP.TIMEOUT)
except Exception as e: 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 def send(self, data: bytes):
async with self.lock: async with self.lock:
@ -100,7 +100,7 @@ class TCP:
self.writer.write(data) self.writer.write(data)
await self.writer.drain() await self.writer.drain()
except Exception as e: 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) raise OSError(e)
async def recv(self, length: int = 0): async def recv(self, length: int = 0):

View File

@ -41,7 +41,7 @@ class Terminate:
if self.takeout_id: if self.takeout_id:
await self.invoke(raw.functions.account.FinishTakeoutSession()) 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.storage.save()
await self.dispatcher.stop() await self.dispatcher.stop()

View File

@ -63,7 +63,7 @@ class Start:
if not await self.storage.is_bot() and self.takeout: if not await self.storage.is_bot() and self.takeout:
self.takeout_id = (await self.invoke(raw.functions.account.InitTakeoutSession())).id 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()) await self.invoke(raw.functions.updates.GetState())
except (Exception, KeyboardInterrupt): except (Exception, KeyboardInterrupt):

View File

@ -131,7 +131,7 @@ class HTML:
for tag, entities in parser.tag_entities.items(): for tag, entities in parser.tag_entities.items():
unclosed_tags.append(f"<{tag}> (x{len(entities)})") 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 = [] entities = []

View File

@ -229,7 +229,7 @@ class Session:
raise SecurityCheckMismatch("The msg_id belongs to over 300 seconds in the past. " raise SecurityCheckMismatch("The msg_id belongs to over 300 seconds in the past. "
"Most likely the client time has to be synchronized.") "Most likely the client time has to be synchronized.")
except SecurityCheckMismatch as e: except SecurityCheckMismatch as e:
log.warning("Discarding packet: %s", e) log.info("Discarding packet: %s", e)
await self.connection.close() await self.connection.close()
return return
else: else: