Skip to content
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

Disable console logging when running tests #1368

Merged
merged 1 commit into from
May 7, 2024

Conversation

bgrgicak
Copy link
Collaborator

@bgrgicak bgrgicak commented May 7, 2024

Fixes #1345

What is this PR doing?

It makes the output of logs cleaner by hiding logger output when running tests.

What problem is it solving?

All logger messages are currently displayed in the test run output which makes it hard to read.

How is the problem addressed?

By determining if the current environment is a test and if yes, logToConsole is disabled.

This can still be overridden by manually initializing the logger.

Testing Instructions

  • ensure all tests pass
  • check the unit test output and confirm there are no unwanted logs

@bgrgicak bgrgicak changed the title Disable logToConsole for tests Disable console logging when running tests May 7, 2024
@bgrgicak bgrgicak self-assigned this May 7, 2024
@bgrgicak bgrgicak requested a review from a team May 7, 2024 08:52
@adamziel adamziel merged commit 6027acd into trunk May 7, 2024
5 checks passed
@adamziel adamziel deleted the update/1345-silence-logger-in-tests branch May 7, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loggers: Silence irrelevant error logs in unit tests
2 participants