No default logger
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keystoneauth |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Using:
keystoneauth1=
ansible=2.1.0.0
I am attempting to build instances in OpenStack Liberty using the ansible os_server module. If I am building instances linearly everything works as expected.
If I try and use ansibles async option it explodes with JSON parsing errors, those appeared to be caused by the following output:
"No handlers could be found for logger keystoneauth.
Adding the following to keystoneauth.
--snip--
import logging
logging.
--snip--
The bug is mostly related to this call:
file: kesytoneauth.
--snip--
17
18 from keystoneauth1 import _utils as utils
19 from keystoneauth1 import discover
20 from keystoneauth1 import exceptions
21 from keystoneauth1.
22
23
24 LOG = utils.get_
25
--snip--
I'm not sure this is something that keystoneauth has much control over. Using the logging library (which is what utils.get_logger is doing) is a common practice in python that lets the base application set up some sort of sensible logging (like to a file, or syslog or whatever) and have all its libraries do the right thing.
The easiest way to silence this is in your application do like:
import logging
logging. basicConfig( level=logging. WARN)
which will emit to the console only things of WARN level. You can then do more complex logging as it makes sense.