3434 UserStatusHandler , RawUpdateHandler , InlineQueryHandler , PollHandler
3535)
3636
37- log = logging .getLogger (__name__ )
38-
3937
4038class Dispatcher :
4139 NEW_MESSAGE_UPDATES = (
@@ -111,7 +109,7 @@ async def start(self):
111109 asyncio .ensure_future (self .update_worker (self .locks_list [- 1 ]))
112110 )
113111
114- log .info ("Started {} UpdateWorkerTasks" .format (self .workers ))
112+ logging .info ("Started {} UpdateWorkerTasks" .format (self .workers ))
115113
116114 async def stop (self ):
117115 for i in range (self .workers ):
@@ -123,7 +121,7 @@ async def stop(self):
123121 self .update_worker_tasks .clear ()
124122 self .groups .clear ()
125123
126- log .info ("Stopped {} UpdateWorkerTasks" .format (self .workers ))
124+ logging .info ("Stopped {} UpdateWorkerTasks" .format (self .workers ))
127125
128126 def add_handler (self , handler , group : int ):
129127 async def fn ():
@@ -185,7 +183,7 @@ async def update_worker(self, lock):
185183 if handler .check (parsed_update ):
186184 args = (parsed_update ,)
187185 except Exception as e :
188- log .error (e , exc_info = True )
186+ logging .error (e , exc_info = True )
189187 continue
190188
191189 elif isinstance (handler , RawUpdateHandler ):
@@ -201,10 +199,10 @@ async def update_worker(self, lock):
201199 except pyrogram .ContinuePropagation :
202200 continue
203201 except Exception as e :
204- log .error (e , exc_info = True )
202+ logging .error (e , exc_info = True )
205203
206204 break
207205 except pyrogram .StopPropagation :
208206 pass
209207 except Exception as e :
210- log .error (e , exc_info = True )
208+ logging .error (e , exc_info = True )
0 commit comments