From 48b594f83d5d56c6a73827d8b1a8913783b62a3a Mon Sep 17 00:00:00 2001 From: Daniela Rus Morales Date: Mon, 25 Nov 2024 19:30:56 +0100 Subject: [PATCH] Output content of build static dir (with logger) --- sphinx_nefertiti/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sphinx_nefertiti/__init__.py b/sphinx_nefertiti/__init__.py index f9294a2..18cce2f 100644 --- a/sphinx_nefertiti/__init__.py +++ b/sphinx_nefertiti/__init__.py @@ -4,13 +4,16 @@ import shutil from pathlib import Path +from sphinx.util import logging + from sphinx_nefertiti import colorsets, docsver, fonts, links, pygments __version__ = "0.5.0" - pages_wo_index = ["genindex", "search"] +logger = logging.getLogger(__name__) + def get_html_theme_path(): """Return absolute path to parent folder of installed theme.""" @@ -78,10 +81,10 @@ def update_context(app, pagename, templatename, context, doctree): def build_finished(app, exc): - print(f"Files in {app.builder.outdir}") # noqa: T201 + logger.info(f"Files in {app.builder.outdir}") static_dir = Path(app.builder.outdir) / "_static" for item in static_dir.iterdir(): - print(f"\t{item}") # noqa: T201 + logger.info(f" - {item}") def setup(app):