-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress everest logger output to the console #9371
Conversation
b666b8a
to
ad6861b
Compare
Unfortunately, it has proven difficult to write a test for this, because Therefore I will not write a test. If we experience a regression with this issue, it will become evident immediately since it will show up in the console. |
log_level=logging.INFO, | ||
) | ||
def _configure_loggers(config: EverestConfig) -> None: | ||
def _make_handler(path: Path, log_level: str | int = "INFO") -> dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicky comment: I would rename this to make_handler_config
) | ||
detached_dir = Path(ServerConfig.get_detached_node_dir(config.output_dir)) | ||
log_dir = Path(config.log_dir) | ||
logging_dict = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you consider naming this logging_config
?
file_path=os.path.join(detached_node_dir, "endpoint.log"), | ||
log_level=logging.INFO, | ||
) | ||
def _configure_loggers(config: EverestConfig) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for this function to only get the required components from EverestConfig and not the entire object?
ad6861b
to
0419bb6
Compare
0419bb6
to
1b3c354
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you ❤️
Issue
Resolves #9269
Approach
Redo logging setup using dict configuration, which mysteriously fixes the issue.
git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"'
)When applicable