Skip to content

Commit 34965de

Browse files
committed
Change debug logs to info
Updating loggers config is not that often, and to be able to debug with some confidence, is good to see exactly which loggers were enabled with which levels, so we convert logs about configuring the loggers from debug to info. Now that we are showing how loggers are being configured, there is no need to show the whole new configuration, which could be pretty lengthy. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 6e5f995 commit 34965de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frequenz/sdk/config/_logging_actor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,18 @@ def _update_logging(self, config: LoggingConfig) -> None:
174174
logging.getLogger(logger_id).setLevel(logging.NOTSET)
175175

176176
self._current_config = config
177-
_logger.debug(
177+
_logger.info(
178178
"Setting root logger level to '%s'", self._current_config.root_logger.level
179179
)
180180
logging.getLogger().setLevel(self._current_config.root_logger.level)
181181

182182
# For each logger in the new config, set the log level
183183
for logger_id, logger_config in self._current_config.loggers.items():
184-
_logger.debug(
184+
_logger.info(
185185
"Setting log level for logger '%s' to '%s'",
186186
logger_id,
187187
logger_config.level,
188188
)
189189
logging.getLogger(logger_id).setLevel(logger_config.level)
190190

191-
_logger.info("Logging config changed to: %s", self._current_config)
191+
_logger.info("Logging config update completed.")

0 commit comments

Comments
 (0)