mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix logging filter
This commit is contained in:
parent
39c8d859dc
commit
ccb8245ada
1 changed files with 4 additions and 3 deletions
|
|
@ -161,7 +161,8 @@ class LoggingFilter(logging.Filter):
|
|||
'()': GELFRabbitHandler,
|
||||
'url': 'amqp://localhost:5672/',
|
||||
'routing_key': '#',
|
||||
'localname': 'testapp'
|
||||
'localname': 'testapp',
|
||||
'filters': ['telegram']
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -188,7 +189,7 @@ class LoggingFilter(logging.Filter):
|
|||
update = types.Update.get_current(True)
|
||||
if update:
|
||||
for key, value in self.make_prefix(self.prefix, self.process_update(update)):
|
||||
setattr(self, key, value)
|
||||
setattr(record, key, value)
|
||||
|
||||
return True
|
||||
|
||||
|
|
@ -395,7 +396,7 @@ class LoggingFilter(logging.Filter):
|
|||
yield 'callback_query_data', callback_query.data
|
||||
|
||||
if callback_query.message:
|
||||
yield from self.process_message(callback_query.message)
|
||||
yield from self.make_prefix('callback_query_message', self.process_message(callback_query.message))
|
||||
if callback_query.inline_message_id:
|
||||
yield 'callback_query_inline_message_id', callback_query.inline_message_id
|
||||
if callback_query.chat_instance:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue