No log handler is set for middleware.auth_token

Bug #1212472 reported by Kui Shi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
In Progress
Low
Kui Shi

Bug Description

run test in python-keystoneclient, there will be a logging warning:

No handlers could be found for logger "keystoneclient.middleware.auth_token"

In keystoneclient/middleware/auth_token.py, AuthProtocol.__init__,
the logging handler is not set for self.LOG, the warning info can not be processed except ejeceting "No handlers..." error.

logging.basicConfig will help to set the handler,

Cited from pydoc
--------------------
logging.basicConfig = basicConfig(**kwargs)
    Do basic configuration for the logging system.

    This function does nothing if the root logger already has handlers
    configured. It is a convenience method intended for use by simple scripts
    to do one-shot configuration of the logging package.

    The default behaviour is to create a StreamHandler which writes to
    sys.stderr, set a formatter using the BASIC_FORMAT format string, and
    add the handler to the root logger.

Kui Shi (skuicloud)
Changed in python-keystoneclient:
assignee: nobody → Kui Shi (skuicloud)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/42048

Changed in python-keystoneclient:
status: New → In Progress
Dolph Mathews (dolph)
Changed in python-keystoneclient:
importance: Undecided → Low
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.