Change logging level for 'oslo_db'

Currently, running a command such as 'nova-manage' produces a lot of
irrelevant debug messages from the 'oslo_db' module. For example:

  $ nova-manage vm list
  instance   node            type       state      launched ...
  2015-10-29 15:20:32.624 DEBUG oslo_db.api [req-0fc5d653-a78f-44...
  ...
  test1      nova-dev        m1.tiny    active     2015-10-29 ...

Change the default logging level for this module to ensure this output
is not shown.

Change-Id: I85d4f18b7d32d9e2cbac22e075c435b7c84e7020
Closes-bug: #1343697
This commit is contained in:
Stephen Finucane 2015-10-29 15:28:18 +00:00
parent 2c050707af
commit ecc4952ada
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,8 @@ CONF.import_opt('public_interface', 'nova.network.linux_net')
QUOTAS = quota.QUOTAS
_DEFAULT_LOG_LEVELS = config._DEFAULT_LOG_LEVELS + ['oslo_db=INFO']
# Decorators for actions
def args(*args, **kwargs):
@ -1388,6 +1390,7 @@ def main():
CONF.register_cli_opt(category_opt)
try:
config.parse_args(sys.argv)
logging.set_defaults(default_log_levels=_DEFAULT_LOG_LEVELS)
logging.setup(CONF, "nova")
except cfg.ConfigFilesNotFoundError:
cfgfile = CONF.config_file[-1] if CONF.config_file else None