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: I49f55758b65e358154f3afbff3c47d1857073a4a Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
9f866b35a1
commit
eee5fb48a1
|
@ -13,11 +13,13 @@
|
|||
from docutils import nodes
|
||||
from docutils.parsers import rst
|
||||
from docutils.statemachine import ViewList
|
||||
|
||||
import six
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.nodes import nested_parse_with_titles
|
||||
|
||||
from reno import config
|
||||
import six
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _multi_line_string(s, indent=''):
|
||||
|
@ -55,13 +57,10 @@ class ShowConfigDirective(rst.Directive):
|
|||
has_content = True
|
||||
|
||||
def run(self):
|
||||
env = self.state.document.settings.env
|
||||
app = env.app
|
||||
|
||||
result = ViewList()
|
||||
source_name = '<' + __name__ + '>'
|
||||
for line in _format_option_help(config._OPTIONS):
|
||||
app.info(line)
|
||||
LOG.info(line)
|
||||
result.append(line, source_name)
|
||||
|
||||
node = nodes.section()
|
||||
|
|
Loading…
Reference in New Issue