mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Set logger to 'aiogram'
This commit is contained in:
parent
3d878a99d2
commit
a7e654c365
1 changed files with 5 additions and 2 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import io
|
import io
|
||||||
|
import logging
|
||||||
import typing
|
import typing
|
||||||
from asyncio.log import logger
|
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
from babel.support import LazyProxy
|
from babel.support import LazyProxy
|
||||||
|
|
@ -27,6 +27,9 @@ Float = TypeVar('Float', bound=float)
|
||||||
Boolean = TypeVar('Boolean', bound=bool)
|
Boolean = TypeVar('Boolean', bound=bool)
|
||||||
T = TypeVar('T')
|
T = TypeVar('T')
|
||||||
|
|
||||||
|
# Main aiogram logger
|
||||||
|
log = logging.getLogger('aiogram')
|
||||||
|
|
||||||
|
|
||||||
class MetaTelegramObject(type):
|
class MetaTelegramObject(type):
|
||||||
"""
|
"""
|
||||||
|
|
@ -228,7 +231,7 @@ class TelegramObject(ContextInstanceMixin, metaclass=MetaTelegramObject):
|
||||||
self.values[key] = value
|
self.values[key] = value
|
||||||
|
|
||||||
# Log warning when Telegram silently adds new Fields
|
# Log warning when Telegram silently adds new Fields
|
||||||
logger.warning(f"Field '{key}' doesn't exist in {self.__class__}")
|
log.warning(f"Field '%s' doesn't exist in %s", key, self.__class__)
|
||||||
|
|
||||||
def __contains__(self, item: str) -> bool:
|
def __contains__(self, item: str) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue