Fix ranger services logging issue

Change-Id: Ic9c68d78f90d4493d6e766db8731dab436853d45
This commit is contained in:
stewie925 2018-08-08 15:18:25 -05:00
parent 8d991116ad
commit feb25dfd6f
8 changed files with 148 additions and 48 deletions

View File

@ -33,7 +33,10 @@ OrmOpts = [
help='Flag for SSL verfiy Enabled/Disabled.'),
cfg.StrOpt('log_location',
default='/var/log/ranger',
help='Orm log directory.')
help='Orm log directory.'),
cfg.StrOpt('debug_level',
default='DEBUG',
help='logging debug level')
]
CONF.register_opts(OrmOpts)
@ -225,6 +228,7 @@ CONF.register_opts(OrmCliGroup, orm_cli_group)
# referenced to them.
################################################################
debug_level = CONF.debug_level
protocol = CONF.protocol
orm_host = CONF.orm_host
ranger_base = CONF.ranger_base

View File

@ -23,21 +23,24 @@ app = {
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'audit_server': {'level': 'DEBUG', 'handlers': ['console', 'logfile'],
'propagate': False},
'pecan': {'level': 'DEBUG', 'handlers': ['console'],
'orm.services.audit_trail_manager.audit_server': {
'level': config.debug_level,
'handlers': ['console', 'logfile'],
'propagate': False
},
'pecan': {'level': config.debug_level, 'handlers': ['console'],
'propagate': False},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'logfile': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.FileHandler',
'formatter': 'color',
'filename': config.audit_server['log']

View File

@ -26,24 +26,37 @@ app = {
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'cms_rest': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'keystone_utils': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'pecan': {'level': 'DEBUG', 'handlers': ['console'], 'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'keystone_utils': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'audit_client': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'orm.services.customer_manager.cms_rest': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'orm.common.orm_common': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'orm.common.client.keystone.keystone_utils': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'pecan': {'level': 'DEBUG', 'handlers': ['console'],
'propagate': False},
'orm.common.client.audit.audit_client': {'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,

View File

@ -26,22 +26,36 @@ app = {
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'fms_rest': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'orm.services.flavor_manager.fms_rest': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'pecan': {'level': 'DEBUG', 'handlers': ['console'], 'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'keystone_utils': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'audit_client': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'orm.common.orm_common': {'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'orm.common.client.keystone.keystone_utils': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'orm.common.client.audit.audit_client': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,

View File

@ -13,6 +13,48 @@ app = {
'debug': True,
}
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'orm.services.id_generator.uuidgen': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'pecan': {'level': config.debug_level, 'handlers': ['console'],
'propagate': False},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': config.debug_level,
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,
'filename': config.uuid['log'],
'formatter': 'simple'
}
},
'formatters': {
'simple': {
'format': ('%(asctime)s %(levelname)-5.5s [%(name)s]'
'[%(threadName)s] %(message)s')
},
'color': {
'()': 'pecan.log.ColorFormatter',
'format': ('%(asctime)s [%(padded_color_levelname)s] [%(name)s]'
'[%(threadName)s] %(message)s'),
'__force_dict__': True
}
}
}
verify = config.ssl_verify
database = {
'connection_string': config.db_url + 'orm'

View File

@ -24,25 +24,29 @@ app = {
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'ims': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'audit_client': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'pecan': {'level': 'DEBUG', 'handlers': ['console'],
'orm.services.image_manager.ims': {'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'orm.common.client.audit.audit_client': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'orm.common.orm_common': {'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'pecan': {'level': config.debug_level, 'handlers': ['console'],
'propagate': False},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,

View File

@ -24,28 +24,37 @@ app = {
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'rms': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'pecan': {'level': 'DEBUG', 'handlers': ['console'],
'orm.services.region_manager.rms': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'pecan': {'level': config.debug_level, 'handlers': ['console'],
'propagate': False},
'audit_client': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'],
'propagate': False},
'keystone_utils': {'level': 'DEBUG',
'handlers': ['console', 'Logfile'],
'propagate': False},
'orm.common.client.audit.audit_client': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'orm.common.orm_common': {'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'orm.common.client.keystone.keystone_utils': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,

View File

@ -158,21 +158,32 @@ region_resource_id_status = {
logging = {
'root': {'level': 'INFO', 'handlers': ['console']},
'loggers': {
'rds': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'orm_common': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'audit_client': {'level': 'DEBUG', 'handlers': ['console', 'Logfile'], 'propagate': False},
'pecan': {'level': 'DEBUG', 'handlers': ['console'], 'propagate': False},
'orm.services.resource_distributor.rds': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'orm.common.orm_common': {'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False},
'orm.common.client.audit.audit_client': {
'level': config.debug_level,
'handlers': ['console', 'Logfile'],
'propagate': False
},
'pecan': {'level': config.debug_level,
'handlers': ['console'], 'propagate': False},
'py.warnings': {'handlers': ['console']},
'__force_dict__': True
},
'handlers': {
'console': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.StreamHandler',
'formatter': 'color'
},
'Logfile': {
'level': 'DEBUG',
'level': config.debug_level,
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 50000000,
'backupCount': 10,