Update sphinx extension logging
Sphinx 1.6 deprecated using the application object to perform logging and it will be removed in the upcoming 2.0 release. This updates our extensions to use the recommended sphinx.util.logging instead. Change-Id: Id7da5a90b804420ece0699e4986b382e6d8bc8f2 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
2298afed75
commit
c09b80440a
|
@ -14,14 +14,18 @@
|
|||
|
||||
import os
|
||||
|
||||
from sphinx.util import logging
|
||||
|
||||
from oslo_config import generator
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def generate_sample(app):
|
||||
|
||||
if not app.config.config_generator_config_file:
|
||||
app.warn("No config_generator_config_file is specified, "
|
||||
"skipping sample config generation")
|
||||
LOG.warning("No config_generator_config_file is specified, "
|
||||
"skipping sample config generation")
|
||||
return
|
||||
|
||||
# Decided to update the existing config option
|
||||
|
@ -52,7 +56,7 @@ def _get_default_basename(config_file):
|
|||
def _generate_sample(app, config_file, base_name):
|
||||
|
||||
def info(msg):
|
||||
app.info('[%s] %s' % (__name__, msg))
|
||||
LOG.info('[%s] %s' % (__name__, msg))
|
||||
|
||||
# If we are given a file that isn't an absolute path, look for it
|
||||
# in the source directory if it doesn't exist.
|
||||
|
|
Loading…
Reference in New Issue