Skip to content

Create a null logger if a logger is not provided #619

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

Merged
merged 1 commit into from
Feb 18, 2023
Merged

Conversation

jcouball
Copy link
Member

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

Rather than allow the logger to be nil which requires special casing it use, create a null logger with Logger.new(nil) which gives a functional logger object that does not log anything.

This should make the code a little less complex.

Signed-off-by: James Couball <jcouball@yahoo.com>
@jcouball jcouball merged commit 9ee7ca9 into master Feb 18, 2023
@jcouball jcouball deleted the default_logger branch February 18, 2023 23:52
@jcouball jcouball mentioned this pull request Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant