diff options
author | 2020-08-17 13:00:47 -0700 | |
---|---|---|
committer | 2020-08-19 13:52:20 -0700 | |
commit | 7c90d325e8fd8ce21fa747ab292f9c233e3bf367 (patch) | |
tree | 6857c930b3c558a6bb52b33ade86efc20581589f /onap-client/onap_client/config.py | |
parent | 6b5ef9b8b18f46358e699686a6e706ed3002bd9a (diff) |
[VVP] Updating logging
Updating logging to inherit logging instacne from
calling application. CLI creates own logging instance.
Issue-ID: VVP-456
Signed-off-by: stark, steven <steven.stark@att.com>
Change-Id: I1277eb55413063e90b1681b36881a6a5a2b9c272
Signed-off-by: stark, steven <steven.stark@att.com>
Diffstat (limited to 'onap-client/onap_client/config.py')
-rw-r--r-- | onap-client/onap_client/config.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/onap-client/onap_client/config.py b/onap-client/onap_client/config.py index 2436619..6fe43e9 100644 --- a/onap-client/onap_client/config.py +++ b/onap-client/onap_client/config.py @@ -70,7 +70,7 @@ class Config: with open(self.config_file, "r") as f: config_data = yaml.safe_load(f) except FileNotFoundError: - logging.warn( + logging.debug( "Config file {} not found, using default.".format(self.config_file) ) @@ -96,11 +96,3 @@ APPLICATION_ID = "robot-ete" CONFIG_ENV = os.environ.get("OC_CONFIG") CONFIG_FILE = CONFIG_ENV or "/etc/onap_client/config.yaml" APP_CONFIG = load_config(CONFIG_FILE, "onap_client") -LOG = logging.getLogger("ONAP_CLIENT") -LOG.propagate = False -log_level = getattr(logging, APP_CONFIG.LOG_LEVEL.upper()) -ch = logging.StreamHandler() -LOG.setLevel(log_level) -formatter = logging.Formatter('%(levelname)s %(asctime)s %(name)s %(message)s') -ch.setFormatter(formatter) -LOG.addHandler(ch) |