mirror of
https://github.com/Dineshkarthik/telegram_media_downloader.git
synced 2025-01-07 14:48:34 +08:00
16 lines
353 B
Python
16 lines
353 B
Python
|
"""Util module to handle logs."""
|
||
|
import logging
|
||
|
|
||
|
|
||
|
class LogFilter(logging.Filter):
|
||
|
"""
|
||
|
Custom Log Filter.
|
||
|
|
||
|
Ignore logs from specific functions.
|
||
|
"""
|
||
|
# pylint: disable = W0221
|
||
|
def filter(self, log_record):
|
||
|
if log_record.funcName == "send" or log_record.funcName == "get_file":
|
||
|
return False
|
||
|
return True
|