Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

[logging] Fix suppression of debug logs #3658

Merged
merged 1 commit into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion parlai/core/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,6 @@ def parse_args(self, args=None, namespace=None, **kwargs):

self._process_args_to_opts(args)
print_announcements(self.opt)
logging.set_log_level(self.opt.get('loglevel', 'info').upper())

assert '_subparser' not in self.opt

Expand Down
1 change: 1 addition & 0 deletions parlai/core/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def _run_args(cls, args: Optional[List[str]] = None):

@classmethod
def _run_from_parser_and_opt(cls, opt: Opt, parser: ParlaiParser):
logging.set_log_level(opt.get('loglevel', 'info').upper())
script = cls(opt)
script.parser = parser
return script.run()
Expand Down
2 changes: 1 addition & 1 deletion parlai/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def unmute(self):
# -----------------------------------
# Forming the logger #
# -----------------------------------
logger = ParlaiLogger(name=__name__)
logger = ParlaiLogger(name="parlai")


def set_log_level(level):
Expand Down