Skip to content

Commit

Permalink
change string debug and verbose to boolean
Browse files Browse the repository at this point in the history
LP#1398783
  • Loading branch information
xtrusia committed Oct 21, 2015
1 parent a747b8f commit 4f82079
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
options:
debug:
default: "false"
type: string
type: boolean
default: False
description: Enable verbose logging.
verbose:
default: "false"
type: string
type: boolean
default: False
description: Enable debug logging.
use-syslog:
type: boolean
Expand Down
8 changes: 3 additions & 5 deletions hooks/keystone_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,8 @@ def __call__(self):
ctxt['public_port'] = determine_api_port(api_port('keystone-public'),
singlenode_mode=True)

debug = config('debug')
ctxt['debug'] = debug and bool_from_string(debug)
verbose = config('verbose')
ctxt['verbose'] = verbose and bool_from_string(verbose)
ctxt['debug'] = config('debug')
ctxt['verbose'] = config('verbose')
ctxt['token_expiration'] = config('token-expiration')

ctxt['identity_backend'] = config('identity-backend')
Expand Down Expand Up @@ -263,7 +261,7 @@ class KeystoneLoggingContext(context.OSContextGenerator):
def __call__(self):
ctxt = {}
debug = config('debug')
if debug and bool_from_string(debug):
if debug:
ctxt['root_level'] = 'DEBUG'

return ctxt

0 comments on commit 4f82079

Please sign in to comment.