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: Ib76bdcfa691b1ae02d95d0d171dbaf67a933ff05
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2018-10-16 14:13:37 -05:00
parent 8184f6bfe9
commit c1491f20ab
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
3 changed files with 20 additions and 14 deletions

View File

@ -10,21 +10,21 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Build candidates list
"""
"""Build candidates list"""
import jinja2
import jinja2.environment
import os
import yaml
from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.statemachine import ViewList
from openstack_election import utils
import jinja2
import jinja2.environment
from sphinx.util import logging
from sphinx.util.nodes import nested_parse_with_titles
from openstack_election import utils
LOG = logging.getLogger(__name__)
@ -144,7 +144,7 @@ class CandidatesDirective(Directive):
def setup(app):
app.info('loading candidates extension')
LOG.info('loading candidates extension')
app.connect('builder-inited', build_lists)
app.add_directive('candidates', CandidatesDirective)
return {'version': '0.1'}

View File

@ -10,15 +10,18 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Build configuration substitution
"""
"""Build configuration substitution"""
import os
import jinja2
import jinja2.environment
import os
from sphinx.util import logging
from openstack_election.utils import conf
LOG = logging.getLogger(__name__)
def build_configuration(app):
output_file = os.path.join(".", "doc", "source", "configuration.rst")
@ -31,5 +34,5 @@ def build_configuration(app):
def setup(app):
app.info('loading configuration extension')
LOG.info('loading configuration extension')
app.connect('builder-inited', build_configuration)

View File

@ -10,15 +10,18 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Add election timer data
"""
"""Add election timer data"""
import os
import jinja2
import jinja2.environment
import os
from sphinx.util import logging
from openstack_election import utils
LOG = logging.getLogger(__name__)
def build_timer(app):
app.add_javascript("event_timer.js")
@ -32,5 +35,5 @@ def build_timer(app):
def setup(app):
app.info('loading events_timer extension')
LOG.info('loading events_timer extension')
app.connect('builder-inited', build_timer)