mirror of
https://github.com/Dineshkarthik/telegram_media_downloader.git
synced 2025-01-06 06:04:06 +08:00
15 lines
353 B
Python
15 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
|