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

[logging] Fix suppression of debug logs #3658

merged 1 commit into from
May 20, 2021

Conversation

stephenroller
Copy link
Contributor

Patch description
Fix an issue where usages of create_agent_from_model_file caused logging to bump back to INFO.

The reason is that we eventually call this line to try to fill in missing args with defaults:

opt_parser = parser.parse_args("")

Which would get the default args and accidentally call set_log_level here:

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

As a solution, I moved setting the log level to happen in the abstract ParlaiScript class.

Testing steps
Manual testing.

Copy link
Contributor

@mojtaba-komeili mojtaba-komeili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stephenroller stephenroller merged commit 157f416 into master May 20, 2021
@stephenroller stephenroller deleted the loggingdebug branch May 20, 2021 01:50
@klshuster
Copy link
Contributor

thanks for the fix!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants