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

Don't use root logger #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Don't use root logger #48

wants to merge 3 commits into from

Conversation

davisdude
Copy link
Contributor

@davisdude davisdude commented Feb 25, 2023

Python documentation recommends against logging to the root logger. This changes logging to slippi.log instead. (You could also change the logger to slippi or something else; __name__ is just the most commonplace).

It is strongly advised that you do not log to the root logger in your library. Instead, use a logger with a unique and easily identifiable name, such as the __name__ for your library’s top-level package or module. Logging to the root logger will make it difficult or impossible for the application developer to configure the logging verbosity or handlers of your library as they wish.

davisdude added a commit to davisdude/py-slippi that referenced this pull request Jul 4, 2023
hohav#48

commit fb362f2
Author: Davis <[email protected]>
Date:   Mon Jul 3 11:01:18 2023 -0500

    Updated version number

commit 2588e08
Author: Davis <[email protected]>
Date:   Fri Feb 24 22:16:16 2023 -0600

    Updated tests

commit e01ecad
Author: Davis <[email protected]>
Date:   Fri Feb 24 22:11:29 2023 -0600

    Don't use root logger
davisdude added a commit to davisdude/py-slippi that referenced this pull request Jul 4, 2023
hohav#48

commit fb362f2
Author: Davis <[email protected]>
Date:   Mon Jul 3 11:01:18 2023 -0500

    Updated version number

commit 2588e08
Author: Davis <[email protected]>
Date:   Fri Feb 24 22:16:16 2023 -0600

    Updated tests

commit e01ecad
Author: Davis <[email protected]>
Date:   Fri Feb 24 22:11:29 2023 -0600

    Don't use root logger
davisdude added a commit to davisdude/py-slippi that referenced this pull request Jul 4, 2023
hohav#48

commit fb362f2
Author: Davis <[email protected]>
Date:   Mon Jul 3 11:01:18 2023 -0500

    Updated version number

commit 2588e08
Author: Davis <[email protected]>
Date:   Fri Feb 24 22:16:16 2023 -0600

    Updated tests

commit e01ecad
Author: Davis <[email protected]>
Date:   Fri Feb 24 22:11:29 2023 -0600

    Don't use root logger
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