Update keystone wsgi httpd script for oslo logging

When updating to the oslo logging module, it appears that this script
was missed, and erroneously still references .DEBUG, which is not
available in the oslo logging module.  This commit corrects the issue
and updates the reference to oslo log module to not be aliased to
"logging".

The extra logic to set the debug on the instantiated logger is still
needed to ensure all logging is seen (startup config logging, etc).

fixes-bug: 1220012
Change-Id: If5b4f9f28cb9d05f914848cbdb54b10c2c5f3b2d
This commit is contained in:
Morgan Fainberg 2013-09-02 17:07:32 -07:00
parent 372a06236a
commit d98dca9f98

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import logging
import os import os
from paste import deploy from paste import deploy
@ -31,10 +32,9 @@ gettextutils.install('keystone', lazy=True)
from keystone.common import environment from keystone.common import environment
from keystone import config from keystone import config
from keystone.openstack.common import log as logging from keystone.openstack.common import log
LOG = logging.getLogger(__name__)
CONF = config.CONF CONF = config.CONF
CONF(project='keystone') CONF(project='keystone')
config.setup_logging(CONF) config.setup_logging(CONF)
@ -43,7 +43,7 @@ environment.use_stdlib()
name = os.path.basename(__file__) name = os.path.basename(__file__)
if CONF.debug: if CONF.debug:
CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG) CONF.log_opt_values(log.getLogger(CONF.prog), logging.DEBUG)
# NOTE(ldbragst): 'application' is required in this context by WSGI spec. # NOTE(ldbragst): 'application' is required in this context by WSGI spec.
# The following is a reference to Python Paste Deploy documentation # The following is a reference to Python Paste Deploy documentation