Em Mon, 5 Feb 2024 18:51:28 +0100 Vegard Nossum <vegard.nossum@xxxxxxxxxx> escreveu: > As of commit 3e893e16af55 ("docs: Raise the minimum Sphinx requirement > to 2.4.4"), we can use Sphinx's built-in logging facilities. > > Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx> Reviewed-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> > --- > Documentation/sphinx/kernel_abi.py | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py > index 288f26097569..9eb7282cc941 100644 > --- a/Documentation/sphinx/kernel_abi.py > +++ b/Documentation/sphinx/kernel_abi.py > @@ -37,16 +37,18 @@ import os > import subprocess > import sys > import re > -import kernellog > > from docutils import nodes, statemachine > from docutils.statemachine import ViewList > from docutils.parsers.rst import directives, Directive > from docutils.utils.error_reporting import ErrorString > +from sphinx.util import logging > from sphinx.util.docutils import switch_source_input > > __version__ = '1.0' > > +logger = logging.getLogger(__name__) > + > def setup(app): > > app.add_directive("kernel-abi", KernelCmd) > @@ -129,7 +131,7 @@ class KernelCmd(Directive): > else: > content.append(line, f, ln) > > - kernellog.info(self.state.document.settings.env.app, "%s: parsed %i lines" % (fname, n)) > + logger.info("%s: parsed %i lines", fname, n) > > if content: > self.do_parse(content, node) Thanks, Mauro