summaryrefslogtreecommitdiffstats
path: root/httpd/keystone.py
blob: 492d2519e0bac898ef96bdc9c575fdaf16da447c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os

from paste import deploy

from keystone.common import environment
from keystone.common import logging
from keystone import config
from keystone.openstack.common import gettextutils

# NOTE(blk-u): Configure gettextutils for deferred translation of messages
# so that error messages in responses can be translated according to the
# Accept-Language in the request rather than the Keystone server locale.
gettextutils.install('keystone', lazy=True)

LOG = logging.getLogger(__name__)
CONF = config.CONF
CONF(project='keystone')
config.setup_logging(CONF)

environment.use_stdlib()
name = os.path.basename(__file__)

if CONF.debug:
    CONF.log_opt_values(logging.getLogger(CONF.prog), logging.DEBUG)

# NOTE(ldbragst): 'application' is required in this context by WSGI spec.
# The following is a reference to Python Paste Deploy documentation
# http://pythonpaste.org/deploy/
application = deploy.loadapp('config:%s' % config.find_paste_config(),
                             name=name)