DSPy: The framework for programming—not prompting—language models
Python
fix: persist log level to settings struct
KCaverly9ba99f3c14f0
diff --git a/dspy/utils/logging.py b/dspy/utils/logging.pyindex 5feb3f3e9..1ad39b823 100644--- a/dspy/utils/logging.py+++ b/dspy/utils/logging.py@@ -47,6 +47,8 @@ class LogSettings:if level not in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]:raise ValueError("log level provider ({level}) is not one of DEBUG, INFO, WARNING, ERROR, CRITICAL")+ self.level = level+log_level = getattr(logging, level)logger.setLevel(log_level)