We've selected this library to implement Raft in an existing project. We experienced some problem because we have a log parser and this package uses the root logger of the logging module, which cannot/should not be replaced.
For example in dns_resolve.py the function logging.warning is used twice.
We resolved our problem suppressing log from the root logger and forcing propagate=False. But this is not ideal. We miss everything logged by this package.
Solution
This package should create and use its own instance of logging.Logger and used it instead of the root logger.
Usage of the python root logger should be limited to small standalone code only.
The problem we've experienced
We've selected this library to implement Raft in an existing project. We experienced some problem because we have a log parser and this package uses the root logger of the
logging
module, which cannot/should not be replaced.For example in
dns_resolve.py
the functionlogging.warning
is used twice.We resolved our problem suppressing log from the root logger and forcing
propagate=False
. But this is not ideal. We miss everything logged by this package.Solution
This package should create and use its own instance of
logging.Logger
and used it instead of the root logger.Usage of the python root logger should be limited to small standalone code only.