~hopem/charms/trusty/keystone/fix-legacy-import-error

« back to all changes in this revision

Viewing changes to hooks/keystone_context.py

  • Committer: Edward Hope-Morley
  • Date: 2015-01-20 12:02:05 UTC
  • mfrom: (105.1.1 keystone.fix-debug-mode)
  • Revision ID: edward.hope-morley@canonical.com-20150120120205-tb2t6zgw1fvlmqtj
[hopem,r=gnuoy]

Set root logger level to DEBUG in /etc/logging.conf
if debug is True otherwise keystone logger remains
as WARNING.

Closes-Bug: 1407317

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
            resolve_address(ADMIN),
135
135
            api_port('keystone-admin')).rstrip('v2.0')
136
136
        return ctxt
 
137
 
 
138
 
 
139
class KeystoneLoggingContext(context.OSContextGenerator):
 
140
 
 
141
    def __call__(self):
 
142
        ctxt = {}
 
143
        debug = config('debug')
 
144
        if debug and debug.lower() in ['yes', 'true']:
 
145
            ctxt['root_level'] = 'DEBUG'
 
146
 
 
147
        return ctxt