From 34c765709d6092bd2669a50764f91b01cbc3e4b7 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Wed, 13 May 2026 13:28:27 -0500 Subject: [PATCH] feat: add logger.verbose() convenience method Adds a verbose() method to all loggers for the VERBOSE (15) level, matching the pattern used by roadblock's verbose_debug. Co-Authored-By: Claude Opus 4.6 (1M context) --- python/toolbox/logging.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/toolbox/logging.py b/python/toolbox/logging.py index 28342d2..6bc152d 100644 --- a/python/toolbox/logging.py +++ b/python/toolbox/logging.py @@ -8,6 +8,14 @@ logging.addLevelName(VERBOSE, "VERBOSE") +def _verbose(self, message, *args, **kws): + if self.isEnabledFor(VERBOSE): + self._log(VERBOSE, message, args, **kws) + + +logging.Logger.verbose = _verbose + + def setup_logging(name, level="normal"): """Configure logging on the root logger and return a named logger.