log level is inherited from importing code

Bug #1023139 reported by David Kranz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Invalid
Undecided
Unassigned

Bug Description

I was using the python library in this code and discovered that if an app imports keystone client and sets the log level to debug, it activates debugging in this library. It seems to me that a library should not do that. Is this by design?

Revision history for this message
Joseph Heck (heckj) wrote :

That's by design, at least as far as I think you're seeing it - if the logger is set to DEBUG, it'll print out request and response, but doesn't (i think) set httplib2.debuglevel to 1, which is what you get when you add the --debug flag through the CLI.

Could you detail more of what you're seeing?

Changed in python-keystoneclient:
status: New → Incomplete
importance: Undecided → Critical
importance: Critical → Undecided
Revision history for this message
David Kranz (david-kranz) wrote :

OK, I guess this is not a bug. My thought was that this kind of library should not be using the root logger state of the code that imports it but sometimes that is what you want. Just another twist in the python road for me :).

Changed in python-keystoneclient:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.