telegram_media_downloader/utils/log.py

17 lines
313 B
Python
Raw Permalink Normal View History

2020-12-31 21:27:41 +08:00
"""Util module to handle logs."""
import logging
class LogFilter(logging.Filter):
"""
Custom Log Filter.
Ignore logs from specific functions.
"""
2020-12-31 21:27:41 +08:00
# pylint: disable = W0221
def filter(self, record):
if record.funcName in ("invoke"):
2020-12-31 21:27:41 +08:00
return False
return True