Ranger - Configurable log levels (446125)

Logging level can now be set from conf file using debug_level.
Default setting is ERROR. Use debug_level to override the setting.
Valid choices are CRITICAL, DEBUG, ERROR, INFO and  WARNING

Change-Id: Idcd81bdb6b909a3f168bae11bfa0c283ec0d757c
This commit is contained in:
ranadheer 2018-12-27 12:41:57 +05:30
parent ec108b0d7d
commit 8027f68e63
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,10 @@ log_location = '/var/log/ranger/'
# use_handlers determine where output logging is routed to
# valid values are 'console', 'logfile', or 'console,logfile'
use_handlers = 'console,logfile'
# debug_level indicates the logging output level with default set to ERROR in base_config
# use this setting to override the default level set.
# valid choices are 'CRITICAL', 'DEBUG', 'ERROR', 'INFO', 'WARNING'
debug_level = 'DEBUG'
[keystone_authtoken]
username = 'admin'

View File

@ -44,7 +44,8 @@ OrmOpts = [
default='/var/log/ranger',
help='Orm log directory.'),
cfg.StrOpt('debug_level',
default='DEBUG',
default='ERROR',
choices=('CRITICAL', 'DEBUG', 'ERROR', 'INFO', 'WARNING'),
help='logging debug level'),
cfg.StrOpt('use_handlers',
choices=('console', 'logfile', 'console,logfile'),