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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux