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

fix(logger): use name instead of file for logger base #562

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

peckto
Copy link
Contributor

@peckto peckto commented Jul 24, 2024

Fixup for #556
Unfortunately, __file__ does not work, because it returns the full path to the source file (eg. /path-to-venv/gallia/...) and the logger name is expected to be a dot-separated tree with gallia as base (because we filter on that).

I propose to use the __name__ variable for the logger name, it starts with gallia..

Copy link
Contributor

@ferdinandjarisch ferdinandjarisch left a comment

Choose a reason for hiding this comment

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

As said, I didn't test #556 but yeah, __name__ is what I had in mind, as this is what python's logging docs are suggesting to use!

@peckto peckto merged commit be069b8 into master Jul 24, 2024
14 checks passed
@peckto peckto deleted the fixup-logging branch July 24, 2024 13:28
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.

2 participants