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

DM-30286: Add VERBOSE log level #527

Merged
merged 3 commits into from May 24, 2021
Merged

DM-30286: Add VERBOSE log level #527

merged 3 commits into from May 24, 2021

Conversation

timj
Copy link
Member

@timj timj commented May 21, 2021

No description provided.

Copy link
Contributor

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks good. I am a little bit worried about defining new logging levels at library level, this has a potential for colliding with other libraries (if we sell daf_butler to outside world) which can cause some unhappiness.

@timj
Copy link
Member Author

timj commented May 21, 2021

I'm not entirely sure what else I can do. You are correct that this does globally register "VERBOSE" with the python logging system but the python logging system seems to leave little choice. There is no way to add a per-logger level name. If I do not call addLevelName then the log output says "Level 15" instead of "VERBOSE". By definition that can't affect any other log user who is setting level names but it could mean our "level 15" gets renamed by some other bit of code.

@andy-slac
Copy link
Contributor

I agree there is little else we can do here. Let's hope that other people are not doing the same thing as we do or they are not using Python logging. Or we could make call to addLevelName optional based on some documented envvar name, so that in case of collision it would be possible to disable it?

@timj
Copy link
Member Author

timj commented May 22, 2021

Adding an env var filter is something we can add later for some future complaint.

@timj timj merged commit 0d968b8 into master May 24, 2021
@timj timj deleted the tickets/DM-30286 branch May 24, 2021 16:01
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.

None yet

2 participants