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: I5a73a66decb88526b8be3a8fe4edca072e6dec2f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2018-10-16 14:54:59 -05:00
parent 6d93be5276
commit 6e4072fa72
1 changed files with 6 additions and 4 deletions

View File

@ -10,14 +10,16 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Build a table of the current members
"""
"""Build a table of the current members"""
import re
from docutils import nodes
from docutils.parsers.rst.directives.tables import Table
from docutils.parsers.rst import directives
from sphinx.util import logging
LOG = logging.getLogger(__name__)
# Full name (IRC) <E-mail> [expires in] {role}
_PATTERN = re.compile('(?P<name>.*)\s+\((?P<irc>.*)\)\s+\<(?P<email>.*)\>\s+\[(?P<date>.*)\](\s+\{(?P<role>.*)\})?') # noqa
@ -33,7 +35,7 @@ def _parse_members_file(app, filename):
continue
m = _PATTERN.match(line)
if not m:
app.warning('Could not parse line %d of %s: %r' %
LOG.warning('Could not parse line %d of %s: %r' %
(linum, filename, line))
continue
yield m.groupdict()
@ -152,5 +154,5 @@ class MembersTable(Table):
def setup(app):
app.info('loading members extension')
LOG.info('loading members extension')
app.add_directive('memberstable', MembersTable)