summaryrefslogtreecommitdiffstats
path: root/Documentation/sphinx/kernellog.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:49:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:49:45 +0000
commit2c3c1048746a4622d8c89a29670120dc8fab93c4 (patch)
tree848558de17fb3008cdf4d861b01ac7781903ce39 /Documentation/sphinx/kernellog.py
parentInitial commit. (diff)
downloadlinux-2c3c1048746a4622d8c89a29670120dc8fab93c4.tar.xz
linux-2c3c1048746a4622d8c89a29670120dc8fab93c4.zip
Adding upstream version 6.1.76.upstream/6.1.76upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Documentation/sphinx/kernellog.py')
-rw-r--r--Documentation/sphinx/kernellog.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/sphinx/kernellog.py b/Documentation/sphinx/kernellog.py
new file mode 100644
index 000000000..0bc00c138
--- /dev/null
+++ b/Documentation/sphinx/kernellog.py
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Sphinx has deprecated its older logging interface, but the replacement
+# only goes back to 1.6. So here's a wrapper layer to keep around for
+# as long as we support 1.4.
+#
+# We don't support 1.4 anymore, but we'll keep the wrappers around until
+# we change all the code to not use them anymore :)
+#
+import sphinx
+from sphinx.util import logging
+
+logger = logging.getLogger('kerneldoc')
+
+def warn(app, message):
+ logger.warning(message)
+
+def verbose(app, message):
+ logger.verbose(message)
+
+def info(app, message):
+ logger.info(message)