Skip to content

Commit

Permalink
Revert Log's Filters
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Oct 25, 2021
1 parent aee5b99 commit d803fec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tribler-common/tribler_common/logger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
import yaml


# note: this class is used by src/tribler-common/tribler_common/logger/config.yaml
class InfoFilter(logging.Filter):
def filter(self, rec):
return rec.levelno == logging.INFO


# note: this class is used by src/tribler-common/tribler_common/logger/config.yaml
class ErrorFilter(logging.Filter):
def filter(self, rec):
return rec.levelno == logging.ERROR


def setup_logging(config_path='config.yaml', module='core', log_dir='LOG_DIR'):
"""
Setup logging configuration with the given YAML file.
Expand Down

0 comments on commit d803fec

Please sign in to comment.