Drop dependency on log from oslo db code

Openstack common log module registers a few oslo.config options,
which can possibly lead to unpleasant issues (DuplicateOptError)
when we split oslo.db from oslo-incubator into a separate library
and reuse both log and oslo.db in target projects.

We don't use for example, any of the special formatting supported by
ContextAdaptor so we can use logging module from python standart library
instead of common log module.

Related to blueprint oslo-db-lib

Change-Id: I6ec426274eb3b603dbbc894762edb97515a618b2
This commit is contained in:
Victor Sergeyev 2013-11-21 16:03:00 +02:00 committed by Gerrit Code Review
parent 77d09fd8a6
commit eff69ce9fe
4 changed files with 4 additions and 5 deletions

View File

@ -10,12 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
import os
from openstack.common.db.sqlalchemy import migration
from openstack.common.db.sqlalchemy.migration_cli import ext_base
from openstack.common.gettextutils import _ # noqa
from openstack.common import log as logging
LOG = logging.getLogger(__name__)

View File

@ -271,6 +271,7 @@ Efficient use of soft deletes:
"""
import functools
import logging
import os.path
import re
import time
@ -285,7 +286,6 @@ from sqlalchemy.sql.expression import literal_column
from openstack.common.db import exception
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils
sqlite_db_opts = [

View File

@ -15,6 +15,7 @@
# under the License.
import functools
import logging
import os
import subprocess
@ -25,7 +26,6 @@ import sqlalchemy.exc
from openstack.common.db.sqlalchemy import utils
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common.py3kcompat import urlutils
from openstack.common import test

View File

@ -16,6 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import logging
import re
from migrate.changeset import UniqueConstraint
@ -37,8 +38,6 @@ from sqlalchemy import Table
from sqlalchemy.types import NullType
from openstack.common.gettextutils import _
from openstack.common import log as logging
from openstack.common import timeutils