summaryrefslogtreecommitdiff
path: root/sphinx/builders/changes.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-12-22 13:41:56 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-02 12:59:50 +0900
commitb43523fcbecda58ffd1ed31d29d0c9363a42be86 (patch)
treef5dc45705c4d1251503e602b4cdd4ec46341e87e /sphinx/builders/changes.py
parent70d6a560f2e23acbfaa85d1eda7471cfca15f77d (diff)
downloadsphinx-git-b43523fcbecda58ffd1ed31d29d0c9363a42be86.tar.gz
Use sphinx.util.logging instead app.info(), verbose(), debug() and debug2()
Diffstat (limited to 'sphinx/builders/changes.py')
-rw-r--r--sphinx/builders/changes.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index de9e95bf1..d1b908e3d 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -18,6 +18,7 @@ from sphinx import package_dir
from sphinx.locale import _
from sphinx.theming import Theme
from sphinx.builders import Builder
+from sphinx.util import logging
from sphinx.util.osutil import ensuredir, os_path
from sphinx.util.console import bold # type: ignore
from sphinx.util.fileutil import copy_asset_file
@@ -29,6 +30,9 @@ if False:
from sphinx.application import Sphinx # NOQA
+logger = logging.getLogger(__name__)
+
+
class ChangesBuilder(Builder):
"""
Write a summary with all versionadded/changed directives.
@@ -59,9 +63,9 @@ class ChangesBuilder(Builder):
apichanges = [] # type: List[Tuple[unicode, unicode, int]]
otherchanges = {} # type: Dict[Tuple[unicode, unicode], List[Tuple[unicode, unicode, int]]] # NOQA
if version not in self.env.versionchanges:
- self.info(bold('no changes in version %s.' % version))
+ logger.info(bold('no changes in version %s.' % version))
return
- self.info(bold('writing summary file...'))
+ logger.info(bold('writing summary file...'))
for type, docname, lineno, module, descname, content in \
self.env.versionchanges[version]:
if isinstance(descname, tuple):
@@ -125,7 +129,7 @@ class ChangesBuilder(Builder):
break
return line
- self.info(bold('copying source files...'))
+ logger.info(bold('copying source files...'))
for docname in self.env.all_docs:
with codecs.open(self.env.doc2path(docname), 'r', # type: ignore
self.env.config.source_encoding) as f: