mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-01 03:56:21 +02:00
initialize fake logger
This commit is contained in:
parent
aef80ad64c
commit
e1192b1bb3
@ -23,7 +23,7 @@ class HandlerWrapper(handler):
|
||||
RH_KEY = handler.RH_KEY
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(logger=FakeLogger, *args, **kwargs)
|
||||
super().__init__(logger=FakeLogger(), *args, **kwargs)
|
||||
|
||||
return HandlerWrapper
|
||||
|
||||
|
@ -232,14 +232,14 @@ def __init__(self, logger, *args, **kwargs):
|
||||
def emit(self, record):
|
||||
try:
|
||||
msg = self.format(record)
|
||||
except Exception:
|
||||
self.handleError(record)
|
||||
else:
|
||||
if record.levelno >= logging.ERROR:
|
||||
self._logger.error(msg)
|
||||
else:
|
||||
self._logger.stdout(msg)
|
||||
|
||||
except Exception:
|
||||
self.handleError(record)
|
||||
|
||||
|
||||
@register_rh
|
||||
class RequestsRH(RequestHandler, InstanceStoreMixin):
|
||||
|
Loading…
Reference in New Issue
Block a user