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

logger: Fix nil pointer bug. #1540

Merged
merged 1 commit into from
Oct 15, 2021
Merged

logger: Fix nil pointer bug. #1540

merged 1 commit into from
Oct 15, 2021

Conversation

lukebp
Copy link
Member

@lukebp lukebp commented Oct 12, 2021

This fixes a nil pointer bug that is hit when a package attempts to
use its logger without having the log rotator setup.

Now that individual packages initialize the logger themselves instead of
having it initialized by main, it's possible for package loggers to be
used without ever having the log rotator setup. An example is when CLI
tools use politeiawww packages, like when dbutil uses the userdb
implemenations.

This fixes a nil pointer bug that was hit when a package attempts to
use its logger without having the log rotator setup.

Now that individual packages initialize the logger themselves instead of
having it initialized in main, it's possible for package loggers to be
used without ever having the log rotator setup. An example is when CLI
tools use politeiawww packages like when dbutil uses the userdb
implemenations.
Copy link
Member

@amass01 amass01 left a comment

Choose a reason for hiding this comment

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

tACK.

@lukebp lukebp added the bug A bug that made it into a production enviroment. label Oct 12, 2021
@lukebp
Copy link
Member Author

lukebp commented Oct 12, 2021

This bug was introduced by #1527.

@lukebp lukebp added the 91cfcc8 label Oct 12, 2021
@lukebp lukebp merged commit 1bd9ee7 into decred:master Oct 15, 2021
@lukebp lukebp deleted the logger-bug branch February 6, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that made it into a production enviroment.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants