fix: use module logger instead of root logger in exceptions.py#702
Open
Bahtya wants to merge 2 commits intoinfluxdata:masterfrom
Open
fix: use module logger instead of root logger in exceptions.py#702Bahtya wants to merge 2 commits intoinfluxdata:masterfrom
Bahtya wants to merge 2 commits intoinfluxdata:masterfrom
Conversation
The logging.debug() call in _get_message() was using the root logger instead of the module-level 'influxdb_client.client.exceptions' logger. This made it impossible to control the log output via the configured logger namespace. Fixes influxdata#701 Signed-off-by: bahtya <bahtyar153@qq.com>
The cimg/python Docker images for Python 3.9+ are now based on Ubuntu 24.04, which no longer includes wget by default. This caused CI test failures on Python 3.9, 3.10, 3.11, and 3.12. Replace the wget health check with an equivalent curl-based retry loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #701
In
client/exceptions.py,_get_message()useslogging.debug()which logs to the root logger instead of the module-level loggerinfluxdb_client.client.exceptionsdefined on line 7.This makes it difficult to control this log message through the standard logger hierarchy.
Fix
One-line change:
logging.debug()→logger.debug()Testing
logger = logging.getLogger("influxdb_client.client.exceptions")on line 7