fix(logging): ensuring loading default without dup
- updated load of default logging values in cli/api Closes #148 Change-Id: I758d70a8175d4f96f919e0e79238b1a16c1025ba
This commit is contained in:
parent
76906751f6
commit
8ac4a106f9
@ -23,6 +23,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from armada import const
|
||||
from armada.conf import set_default_for_default_log_levels
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
@ -31,8 +32,7 @@ class BaseResource(object):
|
||||
|
||||
def __init__(self):
|
||||
if not (os.path.exists(const.CONFIG_PATH)):
|
||||
logging.register_options(CONF)
|
||||
logging.set_defaults(default_log_levels=CONF.default_log_levels)
|
||||
set_default_for_default_log_levels()
|
||||
logging.setup(CONF, 'armada')
|
||||
|
||||
self.logger = logging.getLogger(__name__)
|
||||
|
@ -17,7 +17,9 @@ from oslo_log import log as logging
|
||||
|
||||
|
||||
from armada import conf
|
||||
|
||||
conf.set_app_default_configs()
|
||||
conf.set_default_for_default_log_levels()
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
@ -28,7 +28,6 @@ if (os.path.exists(const.CONFIG_PATH)):
|
||||
|
||||
|
||||
def set_app_default_configs():
|
||||
set_default_for_default_log_levels()
|
||||
default.register_opts(CONF)
|
||||
|
||||
|
||||
|
@ -10,6 +10,10 @@
|
||||
# The default Keystone authentication url. (string value)
|
||||
#auth_url = http://0.0.0.0/v3
|
||||
|
||||
# Absolute path to the certificate file to use for chart registries (string
|
||||
# value)
|
||||
#certs = <None>
|
||||
|
||||
# Path to Kubernetes configurations. (string value)
|
||||
#kubernetes_config_path = /home/user/.kube/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user