mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add support for third-party logger classes
This commit is contained in:
parent
3440ab3c96
commit
1851b127db
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ HANDLED_STR = ['Unhandled', 'Handled']
|
|||
|
||||
class LoggingMiddleware(BaseMiddleware):
|
||||
def __init__(self, logger=__name__):
|
||||
if not isinstance(logger, logging.Logger):
|
||||
if isinstance(logger, str):
|
||||
logger = logging.getLogger(logger)
|
||||
|
||||
self.logger = logger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue