diff options
author | Sergey Vilgelm <sergey@vilgelm.info> | 2015-07-20 22:28:11 +0300 |
---|---|---|
committer | Sergey Vilgelm <sergey@vilgelm.info> | 2015-07-23 19:31:58 +0300 |
commit | 19862628e43296686344a1dff5db495638a1a995 (patch) | |
tree | 02219b63cfcb2a9c8a890108d4db317ebc111a70 /trove/cmd | |
parent | eed54dbf0cc2c1e65617d4047e7e41bcdf1fc855 (diff) | |
download | trove-19862628e43296686344a1dff5db495638a1a995.tar.gz |
Switch to the oslo_log library
Remove the log module of oslo-incubator.
Move the WritableLogger wrapper to the base_wsgi module.
Add oslo.log to the requirements.
Change-Id: I724fa6090cebf40e7d7c78cc6b8458dfba9508a8
Diffstat (limited to 'trove/cmd')
-rw-r--r-- | trove/cmd/common.py | 6 | ||||
-rwxr-xr-x | trove/cmd/guest.py | 4 | ||||
-rwxr-xr-x | trove/cmd/manage.py | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/trove/cmd/common.py b/trove/cmd/common.py index 862880bd..f0453b45 100644 --- a/trove/cmd/common.py +++ b/trove/cmd/common.py @@ -28,9 +28,11 @@ def initialize(extra_opts=None, pre_logging=None): # Import only the modules necessary to initialize logging and determine if # debug_utils are enabled. import sys + + from oslo_log import log as logging + from trove.common import cfg from trove.common import debug_utils - from trove.openstack.common import log as logging conf = cfg.CONF if extra_opts: @@ -40,7 +42,7 @@ def initialize(extra_opts=None, pre_logging=None): if pre_logging: pre_logging(conf) - logging.setup(None) + logging.setup(conf, None) debug_utils.setup() # Patch 'thread' module if debug is disabled. diff --git a/trove/cmd/guest.py b/trove/cmd/guest.py index b401daf6..9a79910c 100755 --- a/trove/cmd/guest.py +++ b/trove/cmd/guest.py @@ -25,11 +25,11 @@ gettext.install('trove', unicode=1) import sys from oslo_config import cfg as openstack_cfg +from oslo_log import log as logging from oslo_service import service as openstack_service from trove.common import cfg from trove.common import debug_utils -from trove.openstack.common import log as logging CONF = cfg.CONF # The guest_id opt definition must match the one in common/cfg.py @@ -39,7 +39,7 @@ CONF.register_opts([openstack_cfg.StrOpt('guest_id', default=None, def main(): cfg.parse_args(sys.argv) - logging.setup(None) + logging.setup(CONF, None) debug_utils.setup() diff --git a/trove/cmd/manage.py b/trove/cmd/manage.py index 0355388e..87a34797 100755 --- a/trove/cmd/manage.py +++ b/trove/cmd/manage.py @@ -21,6 +21,8 @@ import sys gettext.install('trove', unicode=1) +from oslo_log import log as logging + from trove.common import cfg from trove.common import exception from trove.common.i18n import _ @@ -28,7 +30,6 @@ from trove.common import utils from trove.configuration import models as config_models from trove.datastore import models as datastore_models from trove.db import get_db_api -from trove.openstack.common import log as logging CONF = cfg.CONF @@ -173,7 +174,7 @@ def main(): cfg.parse_args(sys.argv) try: - logging.setup(None) + logging.setup(CONF, None) Commands().execute() sys.exit(0) |