Изменил(а) на 'bot.py'
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8864e1ce38
commit
92db050945
20
bot.py
20
bot.py
@ -9,27 +9,11 @@ from othersq import sendnot
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TagFilter(logging.Filter):
|
|
||||||
def __init__(self):
|
|
||||||
self.tag = 'jack_bot'
|
|
||||||
|
|
||||||
def filter(self, record):
|
|
||||||
record.tag = self.tag
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level = logging.DEBUG,
|
level = logging.DEBUG,
|
||||||
handlers = [ graypy.GELFUDPHandler('localhost', 12201) ]
|
handlers = [ graypy.GELFUDPHandler('localhost', 12201) ]
|
||||||
)
|
)
|
||||||
( logging.getLogger( ) ).addFilter(TagFilter())
|
|
||||||
#logging.LoggerAdapter(logging.getLogger( ), {'tag': 'jack_bot'})
|
|
||||||
#root_logger = logging.getLogger( )
|
|
||||||
|
|
||||||
#handler = graypy.GELFUDPHandler('localhost', 12201)
|
|
||||||
#root_logger.addHandler(handler)
|
|
||||||
#root_logger.addFilter(TagFilter())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pipisa.register_handlers_pipisa(dp)
|
pipisa.register_handlers_pipisa(dp)
|
||||||
@ -42,7 +26,3 @@ sendnot.register_handlers_sendnotal(dp)
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
executor.start_polling(dp, skip_updates=True)
|
executor.start_polling(dp, skip_updates=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user