From 4f82079aa9325b47bae5dfad9873d7f4d39b09de Mon Sep 17 00:00:00 2001 From: Seyeong Kim Date: Wed, 21 Oct 2015 23:54:06 +0000 Subject: [PATCH] change string debug and verbose to boolean LP#1398783 --- config.yaml | 8 ++++---- hooks/keystone_context.py | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/config.yaml b/config.yaml index b00c2f0..8167465 100644 --- a/config.yaml +++ b/config.yaml @@ -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 diff --git a/hooks/keystone_context.py b/hooks/keystone_context.py index 0c02368..04918fd 100644 --- a/hooks/keystone_context.py +++ b/hooks/keystone_context.py @@ -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') @@ -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