Details
Description
When importing "avro.datafile" the logging level of the host application gets overriden.
In the simple example provided here: https://github.com/torgebo/avro-1.8.1-logging-break
the logging level is wrongfully set to "logging.WARNING" during execution instead of "logging.INFO".
The issue seems to be resolved by using module level loggers in the pattern of
logger = logging.getLogger(_name_)
and replacing current calls to the logger named "logging" as this logger "logger" instead. This approach is described here: https://docs.python.org/3/howto/logging.html#logging-advanced-tutorial
When setting logger across all avro source files, it is observed that the application sets the logging level faithfully.
This issue was not observed with python version 2, although the recommended way to resolve module level logging as described in the logging python docs seems to be the same (ie. using the logging.getLogger method to access the logger handle).
Attachments
Issue Links
- blocks
-
AVRO-1885 Release 1.8.2
- Resolved
- links to