Skip to content

Commit 5a5ade4

Browse files
authored
RSDK-10723 Warn about inability to modify module logger levels for now (#5071)
1 parent cf69da9 commit 5a5ade4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

config/logging_level.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ func refreshLogLevelInLock() {
8080
return
8181
}
8282
globalLogger.logger.Info("New log level:", newLevelZap)
83+
84+
// TODO(RSDK-10723): Remove this WARN log, and restart all modules at
85+
// `--log-level=debug` at this point.
86+
globalLogger.logger.Warn(
87+
"Changes to global debug settings will not affect modular logs. " +
88+
"Use 'log_level' in module config or 'log_configuration' in resource config instead",
89+
)
90+
8391
logging.GlobalLogLevel.SetLevel(newLevelZap)
8492
globalLogger.logger.SetLevel(newLevel)
8593
}

web/server/entrypoint.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,14 @@ func (s *robotServer) configWatcher(ctx context.Context, currCfg *config.Config,
391391
// This functionality is tested in `TestLogPropagation` in `local_robot_test.go`.
392392
if !diff.LogEqual {
393393
s.logger.Debug("Detected potential changes to log patterns; updating logger levels")
394+
395+
// TODO(RSDK-10723): Remove this WARN log, and mutate the config to reconfigure
396+
// all appropriate modular resources at this point.
397+
s.logger.Warn(
398+
"Changes to 'log' field will not affect modular logs. " +
399+
"Use 'log_level' in module config or 'log_configuration' in resource config instead",
400+
)
401+
394402
config.UpdateLoggerRegistryFromConfig(s.registry, processedConfig, s.logger)
395403
}
396404

0 commit comments

Comments
 (0)