From 214a67e763094dbeaf2e8207ebd5a93255c34db5 Mon Sep 17 00:00:00 2001 From: avnish Date: Tue, 17 Jan 2017 12:06:22 +0530 Subject: [PATCH] Switch to oslo_log Solum dashboard is currently using python logging module to implement logging functionality. This patch made a switch to oslo.log(logging for openstack projects) Reference:- http://docs.openstack.org/developer/oslo.log Change-Id: I73cae3ac8982f8e328387f867699f051c3097844 --- requirements.txt | 1 + solumdashboard/api/client.py | 3 +-- solumdashboard/applications/forms.py | 3 +-- solumdashboard/languagepacks/forms.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5098688..d00fe92 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ django-openstack-auth>=2.4.0 # Apache-2.0 eventlet!=0.18.3,>=0.18.2 # MIT iso8601>=0.1.11 # MIT netaddr!=0.7.16,>=0.7.13 # BSD +oslo.log>=3.11.0 # Apache-2.0 python-keystoneclient>=3.8.0 # Apache-2.0 python-solumclient>=1.2.7 # Apache-2.0 pytz>=2013.6 # MIT diff --git a/solumdashboard/api/client.py b/solumdashboard/api/client.py index 89a1646..c02e503 100644 --- a/solumdashboard/api/client.py +++ b/solumdashboard/api/client.py @@ -13,14 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from horizon import exceptions from solumclient import client as api_client from openstack_dashboard.api import base from openstack_dashboard.api import keystone +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/solumdashboard/applications/forms.py b/solumdashboard/applications/forms.py index ad2c3e1..16ec23e 100644 --- a/solumdashboard/applications/forms.py +++ b/solumdashboard/applications/forms.py @@ -13,14 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms from horizon import messages +from oslo_log import log as logging from solumclient.common import yamlutils from solumclient.v1 import workflow as cli_wf diff --git a/solumdashboard/languagepacks/forms.py b/solumdashboard/languagepacks/forms.py index 87218b0..6bf2ad0 100644 --- a/solumdashboard/languagepacks/forms.py +++ b/solumdashboard/languagepacks/forms.py @@ -14,7 +14,6 @@ # limitations under the License. import json -import logging from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ @@ -23,6 +22,7 @@ from horizon import exceptions from horizon import forms from horizon import messages +from oslo_log import log as logging from solumclient.common import yamlutils from solumdashboard.api.client import client as solumclient