summaryrefslogtreecommitdiffstats
path: root/Documentation/sphinx/kernellog.py
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2019-06-03 13:00:40 +0200
committerJoerg Roedel <jroedel@suse.de>2019-06-03 13:00:40 +0200
commit2de03c11171544bd23e18539f65b3b561d57ff76 (patch)
treee207052e8cbb53f587c260617c16f97fa9f7d05d /Documentation/sphinx/kernellog.py
parente314a7c92b3217e893cbe03b944c7afc9cbd3e4c (diff)
parentf2c7c76c5d0a443053e94adb9f0918fa2fb85c3a (diff)
downloadblackbird-op-linux-2de03c11171544bd23e18539f65b3b561d57ff76.tar.gz
blackbird-op-linux-2de03c11171544bd23e18539f65b3b561d57ff76.zip
Merge tag 'v5.2-rc3' into x86/vt-d
Linux 5.2-rc3
Diffstat (limited to 'Documentation/sphinx/kernellog.py')
-rw-r--r--Documentation/sphinx/kernellog.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/sphinx/kernellog.py b/Documentation/sphinx/kernellog.py
new file mode 100644
index 000000000000..af924f51a7dc
--- /dev/null
+++ b/Documentation/sphinx/kernellog.py
@@ -0,0 +1,28 @@
+# 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.
+#
+import sphinx
+
+if sphinx.__version__[:3] >= '1.6':
+ UseLogging = True
+ from sphinx.util import logging
+ logger = logging.getLogger('kerneldoc')
+else:
+ UseLogging = False
+
+def warn(app, message):
+ if UseLogging:
+ logger.warning(message)
+ else:
+ app.warn(message)
+
+def verbose(app, message):
+ if UseLogging:
+ logger.verbose(message)
+ else:
+ app.verbose(message)
+
+
OpenPOWER on IntegriCloud