diff options
author | 2016-11-29 18:05:01 +0800 | |
---|---|---|
committer | 2016-11-29 18:09:16 +0800 | |
commit | 6b2eccf0350f7f053e18ea2ac190489b00960809 (patch) | |
tree | 8968b2871c4bfc23bfa7077e857dae4d151e53d2 /deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py | |
parent | fcd0eefae931bb7bed0380574c1c7acaa31ffa28 (diff) |
Improve compass ci verification, clear all the warnnings
JIRA: COMPASS-494
MODIFY BY HAOJINGBO
Change-Id: I2b95d84157c860254b3b3f68f7b2a54393caf8f4
Signed-off-by: meimei <meimei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py')
-rw-r--r-- | deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py b/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py index fffeb589..a22ff0fe 100644 --- a/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py +++ b/deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/files/setup_networks/log.py @@ -1,12 +1,13 @@ import logging import os loggers = {} -log_dir="/var/log/setup_network" +log_dir = "/var/log/setup_network" try: os.makedirs(log_dir) except: pass + def getLogger(name): if name in loggers: return loggers[name] @@ -29,7 +30,8 @@ def getLogger(name): ch.setLevel(logging.ERROR) # create formatter and add it to the handlers - formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") + formatter = logging.Formatter( + "%(asctime)s - %(name)s - %(levelname)s - %(message)s") ch.setFormatter(formatter) fh.setFormatter(formatter) |