From 9fdd096bdacacc43d9788b8097b2723c6423a17a Mon Sep 17 00:00:00 2001 From: avnish Date: Tue, 17 Jan 2017 14:55:38 +0530 Subject: [PATCH] Switch to oslo_log Designate 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: I31b8398e45743a9f797882988d62d779edb89f86 Closes-Bug: #1656167 --- designatedashboard/api/designate.py | 2 +- designatedashboard/api/rest/passthrough.py | 2 +- designatedashboard/dashboards/project/dns_domains/forms.py | 2 +- designatedashboard/dashboards/project/dns_domains/tables.py | 3 +-- requirements.txt | 1 + 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/designatedashboard/api/designate.py b/designatedashboard/api/designate.py index 19541bd..6095410 100644 --- a/designatedashboard/api/designate.py +++ b/designatedashboard/api/designate.py @@ -20,9 +20,9 @@ from designateclient.v1.records import Record # noqa from django.conf import settings # noqa from horizon import exceptions -import logging from openstack_dashboard.api.base import url_for # noqa +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/designatedashboard/api/rest/passthrough.py b/designatedashboard/api/rest/passthrough.py index 8a50569..6b1fa72 100644 --- a/designatedashboard/api/rest/passthrough.py +++ b/designatedashboard/api/rest/passthrough.py @@ -16,7 +16,6 @@ from django.conf import settings from django.views import generic import functools -import logging import requests from requests.exceptions import HTTPError @@ -24,6 +23,7 @@ from horizon import exceptions from openstack_dashboard.api import base from openstack_dashboard.api.rest import urls from openstack_dashboard.api.rest import utils as rest_utils +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/designatedashboard/dashboards/project/dns_domains/forms.py b/designatedashboard/dashboards/project/dns_domains/forms.py index cfd1849..b5987ab 100644 --- a/designatedashboard/dashboards/project/dns_domains/forms.py +++ b/designatedashboard/dashboards/project/dns_domains/forms.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. import functools -import logging import re from designateclient import exceptions as designate_exceptions @@ -27,6 +26,7 @@ from horizon import messages from designatedashboard import api from designatedashboard.dashboards.project.dns_domains.utils\ import limit_records_to_fips +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/designatedashboard/dashboards/project/dns_domains/tables.py b/designatedashboard/dashboards/project/dns_domains/tables.py index 4a33ba0..07b4f8e 100644 --- a/designatedashboard/dashboards/project/dns_domains/tables.py +++ b/designatedashboard/dashboards/project/dns_domains/tables.py @@ -11,8 +11,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -import logging - from django.core import urlresolvers from django.utils.translation import ugettext_lazy as _ # noqa @@ -23,6 +21,7 @@ from horizon.utils import memoized from designatedashboard import api from openstack_dashboard import policy +from oslo_log import log as logging LOG = logging.getLogger(__name__) diff --git a/requirements.txt b/requirements.txt index 39f5aea..c622d4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. +oslo.log>=3.11.0 # Apache-2.0 pbr>=1.8 # Apache-2.0 Babel>=2.3.4 # BSD python-designateclient>=1.5.0 # Apache-2.0