]> Git Repo - qemu.git/blob - docs/sphinx/kernellog.py
works with less than base ISA qemu-system-riscv32 -M virt -bios none -kernel output...
[qemu.git] / docs / sphinx / kernellog.py
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # Sphinx has deprecated its older logging interface, but the replacement
4 # only goes back to 1.6.  So here's a wrapper layer to keep around for
5 # as long as we support 1.4.
6 #
7 import sphinx
8
9 if sphinx.__version__[:3] >= '1.6':
10     UseLogging = True
11     from sphinx.util import logging
12     logger = logging.getLogger('kerneldoc')
13 else:
14     UseLogging = False
15
16 def warn(app, message):
17     if UseLogging:
18         logger.warning(message)
19     else:
20         app.warn(message)
21
22 def verbose(app, message):
23     if UseLogging:
24         logger.verbose(message)
25     else:
26         app.verbose(message)
27
28
This page took 0.028392 seconds and 4 git commands to generate.