From 1deefcbae8c9077f3b0bf5b09e190a736f040c46 Mon Sep 17 00:00:00 2001
From: Andreas Jaeger <aj@suse.com>
Date: Thu, 14 May 2020 18:22:22 +0200
Subject: [PATCH] Doc building: Silence automated_steps

The logs of docs for this repo are really large, silence a small part: The
logging of automated steps debug output.

Change-Id: I3f7991a79bf89f04932bb4501c3f39d0317414e5
---
 doc/source/_exts/automated_steps.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/doc/source/_exts/automated_steps.py b/doc/source/_exts/automated_steps.py
index 4cf4349746..ff226ec2f4 100644
--- a/doc/source/_exts/automated_steps.py
+++ b/doc/source/_exts/automated_steps.py
@@ -30,6 +30,8 @@ from ironic.common import driver_factory
 
 LOG = logging.getLogger(__name__)
 
+# Enable this locally if you need debugging output
+DEBUG = False
 
 def _list_table(add, headers, data, title='', columns=None):
     """Build a list-table directive.
@@ -85,8 +87,9 @@ def _init_steps_by_driver():
     # the methods of the class.
 
     for interface_name in sorted(driver_factory.driver_base.ALL_INTERFACES):
-        LOG.info('[{}] probing available plugins for interface {}'.format(
-            __name__, interface_name))
+        if DEBUG:
+            LOG.info('[{}] probing available plugins for interface {}'.format(
+                __name__, interface_name))
 
         loader = stevedore.ExtensionManager(
             'ironic.hardware.interfaces.{}'.format(interface_name),
@@ -110,8 +113,9 @@ def _init_steps_by_driver():
                     'interface': interface_name,
                     'doc': _format_doc(inspect.getdoc(method)),
                 }
-                LOG.info('[{}] interface {!r} driver {!r} STEP {}'.format(
-                    __name__, interface_name, plugin.name, step))
+                if DEBUG:
+                    LOG.info('[{}] interface {!r} driver {!r} STEP {}'.format(
+                        __name__, interface_name, plugin.name, step))
                 steps.append(step)
 
             if steps: