fix log configurition
Change-Id: I3f072f94a7818518fe9bc4f2ff6a774e877261f2
This commit is contained in:
parent
83cc532b25
commit
5c82831587
@ -16,19 +16,18 @@ import os
|
||||
import re
|
||||
|
||||
import enum
|
||||
from oslo_log import log as logging
|
||||
|
||||
from six.moves import urllib
|
||||
import webob
|
||||
|
||||
from venus.api.openstack import wsgi
|
||||
from venus.api import xmlutil
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus.i18n import _
|
||||
from venus import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
XML_NS_V1 = 'https://www.openstack.org/mediawiki/Venus/1.0/content'
|
||||
|
||||
METADATA_TYPES = enum.Enum('METADATA_TYPES', 'user image')
|
||||
|
@ -18,15 +18,11 @@ It can't be called 'extensions' because that causes namespacing problems.
|
||||
|
||||
"""
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.api import extensions
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def standard_extensions(ext_mgr):
|
||||
extensions.load_standard_extensions(ext_mgr, LOG, __path__, __package__)
|
||||
|
||||
|
@ -13,21 +13,18 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import importutils
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from venus.api.openstack import wsgi
|
||||
from venus.api import xmlutil
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus import exception
|
||||
from venus.i18n import _LE, _LI, _LW
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ExtensionDescriptor(object):
|
||||
"""Base class that defines the contract for extensions.
|
||||
|
||||
|
@ -20,22 +20,19 @@ Common Auth Middleware.
|
||||
|
||||
import os
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_middleware import request_id
|
||||
from oslo_serialization import jsonutils
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from venus.api.openstack import wsgi
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus import context
|
||||
from venus.i18n import _
|
||||
from venus.wsgi import common as base_wsgi
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def pipeline_factory(loader, global_conf, **local_conf):
|
||||
"""A paste pipeline replica that keys off of auth_strategy."""
|
||||
pipeline = local_conf[CONF.auth_strategy]
|
||||
|
@ -13,12 +13,12 @@
|
||||
# under the License.
|
||||
from http import client
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
import webob.dec
|
||||
|
||||
import webob.exc
|
||||
|
||||
from venus.common.utils import LOG
|
||||
|
||||
from venus import exception
|
||||
|
||||
from venus.wsgi import common as base_wsgi
|
||||
@ -27,7 +27,6 @@ from oslo_serialization import jsonutils
|
||||
|
||||
import functools
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
JSON_ENCODE_CONTENT_TYPES = {'application/json', 'application/json-home'}
|
||||
|
||||
|
@ -12,20 +12,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from venus.api.openstack import wsgi
|
||||
from venus.common.utils import LOG
|
||||
from venus import exception
|
||||
from venus.i18n import _, _LI
|
||||
from venus import utils
|
||||
from venus.wsgi import common as base_wsgi
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class FaultWrapper(base_wsgi.Middleware):
|
||||
"""Calls down the middleware stack, making exceptions into faults."""
|
||||
|
||||
|
@ -22,12 +22,11 @@ import webob
|
||||
from xml.dom import minidom
|
||||
from xml.parsers import expat
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import encodeutils
|
||||
from oslo_utils import excutils
|
||||
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus import exception
|
||||
from venus import i18n
|
||||
from venus.i18n import _, _LE, _LI
|
||||
@ -38,7 +37,6 @@ from venus.wsgi import common as wsgi
|
||||
XML_NS_V1 = 'https://www.openstack.org/mediawiki/Venus/1.0/content'
|
||||
XML_NS_ATOM = 'http://www.w3.org/2005/Atom'
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
SUPPORTED_CONTENT_TYPES = (
|
||||
'application/json',
|
||||
|
@ -38,8 +38,6 @@ from venus import version
|
||||
|
||||
i18n.enable_lazy()
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# Decorators for actions
|
||||
def args(*args, **kwargs):
|
||||
|
@ -17,16 +17,13 @@
|
||||
import copy
|
||||
|
||||
from oslo_context import context
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus.i18n import _, _LW
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RequestContext(context.RequestContext):
|
||||
"""Security context and request information.
|
||||
|
||||
|
@ -18,7 +18,6 @@ import sys
|
||||
import warnings
|
||||
|
||||
from oslo_db import options
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.conf import CONF
|
||||
from venus.db.common import _create_facade_lazily
|
||||
@ -27,7 +26,6 @@ from venus.i18n import _
|
||||
|
||||
|
||||
CONF.import_group("profiler", "venus.service")
|
||||
log = logging.getLogger(__name__)
|
||||
options.set_defaults(CONF, connection='sqlite:///$state_path/venus.sqlite')
|
||||
|
||||
|
||||
|
@ -22,18 +22,15 @@ SHOULD include dedicated exception logging.
|
||||
|
||||
import sys
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_versionedobjects import exception as obj_exc
|
||||
import six
|
||||
import webob.exc
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus.i18n import _, _LE
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ConvertedException(webob.exc.WSGIHTTPException):
|
||||
def __init__(self, code=500, title="", explanation=""):
|
||||
self.code = code
|
||||
|
@ -12,11 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_log import log as logging
|
||||
from venus.modules.custom_config.backends.sql import CustomConfigSql
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CustomConfigCore(object):
|
||||
def __init__(self):
|
||||
|
@ -16,14 +16,12 @@
|
||||
import time
|
||||
|
||||
from oslo_db import options
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.conf import CONF
|
||||
from venus.db.common import _create_facade_lazily
|
||||
from venus.modules.custom_config.backends import models
|
||||
|
||||
CONF.import_group("profiler", "venus.service")
|
||||
log = logging.getLogger(__name__)
|
||||
options.set_defaults(CONF, connection='sqlite:///$state_path/venus.sqlite')
|
||||
|
||||
|
||||
|
@ -14,14 +14,9 @@
|
||||
|
||||
"""The template api."""
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.api.openstack import wsgi
|
||||
|
||||
from venus.modules.custom_config.action import CustomConfigCore
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CustomConfigController(wsgi.Controller):
|
||||
def __init__(self, ext_mgr):
|
||||
|
@ -16,15 +16,12 @@ import datetime
|
||||
import json
|
||||
import time
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from venus.common import utils
|
||||
from venus.conf import CONF
|
||||
from venus.modules.search import es_template
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SearchCore(object):
|
||||
def __init__(self):
|
||||
@ -39,7 +36,7 @@ class SearchCore(object):
|
||||
index_names = []
|
||||
status, indexes = utils.request_es(url, 'GET')
|
||||
if status != 200:
|
||||
LOG.error("failed to get all es indexes")
|
||||
utils.LOG.error("failed to get all es indexes")
|
||||
return ""
|
||||
indexes_array = json.loads(indexes)
|
||||
for index in indexes_array:
|
||||
|
@ -14,14 +14,10 @@
|
||||
|
||||
"""The template api."""
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.api.openstack import wsgi
|
||||
from venus.modules.search.action import SearchCore
|
||||
from venus.modules.search.search_lib import ESSearchObj
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SearchController(wsgi.Controller):
|
||||
def __init__(self, ext_mgr):
|
||||
|
@ -18,12 +18,9 @@ from elasticsearch import Elasticsearch
|
||||
import re
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ESSearchObj(object):
|
||||
|
||||
|
@ -17,15 +17,14 @@
|
||||
import contextlib
|
||||
import datetime
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_versionedobjects import base
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus import exception
|
||||
from venus import objects
|
||||
|
||||
|
||||
LOG = logging.getLogger('object')
|
||||
remotable = base.remotable
|
||||
remotable_classmethod = base.remotable_classmethod
|
||||
obj_make_list = base.obj_make_list
|
||||
|
@ -20,7 +20,6 @@ import os
|
||||
import random
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import loopingcall
|
||||
from oslo_service import service
|
||||
from oslo_utils import importutils
|
||||
@ -28,6 +27,7 @@ import osprofiler.notifier
|
||||
from osprofiler import profiler
|
||||
import osprofiler.web
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus import context
|
||||
from venus import exception
|
||||
@ -37,9 +37,6 @@ from venus.wsgi import common as wsgi_common
|
||||
from venus.wsgi import eventlet_server as wsgi
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_profiler(binary, host):
|
||||
if CONF.profiler.profiler_enabled:
|
||||
LOG.warning(
|
||||
|
@ -13,12 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
"""A Timer Task With APScheduler."""
|
||||
|
||||
from oslo_log import log as logging
|
||||
from venus.task.core import delete_es_index_task
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def delete_es_index_job():
|
||||
job = delete_es_index_task.DeleteESIndexTask()
|
||||
|
@ -17,8 +17,8 @@ import socket
|
||||
import time
|
||||
|
||||
from oslo_db import options
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus.db.common import _create_facade_lazily
|
||||
from venus.i18n import _LE
|
||||
@ -26,7 +26,6 @@ from venus.task.backends import models
|
||||
|
||||
# abc
|
||||
CONF.import_group("profiler", "venus.service")
|
||||
log = logging.getLogger(__name__)
|
||||
options.set_defaults(CONF, connection='sqlite:///$state_path/venus.sqlite')
|
||||
|
||||
|
||||
@ -44,7 +43,7 @@ class TaskSql(object):
|
||||
tasks = session.query(models.RegitsterTask).filter_by(
|
||||
task_name=t_name).with_lockmode('update').all()
|
||||
if len(tasks) != 1:
|
||||
log.error(_LE("unsupported task type:%s, please check it"),
|
||||
LOG.error(_LE("unsupported task type:%s, please check it"),
|
||||
t_name)
|
||||
return False
|
||||
|
||||
|
@ -16,11 +16,8 @@ import datetime
|
||||
import six
|
||||
import time
|
||||
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
||||
from venus.common import utils
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus.modules.custom_config.backends.sql import CustomConfigSql
|
||||
from venus.modules.search.search_lib import ESSearchObj
|
||||
@ -28,8 +25,6 @@ from venus.i18n import _LE, _LI
|
||||
from venus.task.backends.sql import TaskSql
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
TASK_NAME = "delete_es_index"
|
||||
|
||||
|
||||
|
@ -14,10 +14,8 @@
|
||||
|
||||
"""A Timer Task With APScheduler."""
|
||||
from apscheduler.schedulers.blocking import BlockingScheduler
|
||||
from oslo_log import log as logging
|
||||
from venus.task import adapter
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
sched = BlockingScheduler()
|
||||
|
||||
|
@ -20,15 +20,12 @@ import sys
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus import exception
|
||||
from venus.i18n import _, _LE
|
||||
from venus import utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Request(webob.Request):
|
||||
pass
|
||||
|
@ -25,19 +25,18 @@ import time
|
||||
import eventlet
|
||||
import eventlet.wsgi
|
||||
import greenlet
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import service
|
||||
from oslo_utils import excutils
|
||||
from oslo_utils import netutils
|
||||
|
||||
from venus.common.utils import LOG
|
||||
from venus.conf import CONF
|
||||
from venus import exception
|
||||
from venus.i18n import _, _LE, _LI
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Server(service.ServiceBase):
|
||||
"""Server class to manage a WSGI server, serving a WSGI application."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user