Re: [PATCH 3/8] doc: kernel_abi.py: convert to sphinx.util.logging

From
Mauro Carvalho Chehab <mchehab@kernel.org>
Date
2024-02-06 04:37:00
Reply to
Vegard Nossum, 2024-02-05
Em Mon,  5 Feb 2024 18:51:28 +0100
Vegard Nossum [off-list ref] 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 <redacted>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
quoted hunk ↗ jump to hunk
---
 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
Thread (32 messages) 32 messages, 6 authors, last reply 2024-02-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help