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.
@@ -21,8 +21,11 @@ from docutils import nodes
from docutils.parsers import rst
from docutils.parsers.rst import directives
from docutils import statemachine as sm
+from sphinx.util import logging
from oslo_config import cfg
+LOG = logging.getLogger(__name__)
+
class ConfigTableDirective(rst.Directive):
"""Directive to extract config options into docs output."""
@@ -106,7 +109,7 @@ class ConfigTableDirective(rst.Directive):
if retval:
options.extend(retval)
else:
- app.info('[config-table] No options found in {}'.format(
+ LOG.info('[config-table] No options found in {}'.format(
module))
# Get options sorted alphabetically but with deprecated options last
