Skip to content

Commit

Permalink
Make module data dir and config reading logs debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
benjirewis committed Nov 21, 2024
1 parent baf6c50 commit 0a250a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func newCloudWatcher(ctx context.Context, config *Config, logger logging.Logger)
}
newConfig, err := readFromCloud(cancelCtx, config, prevCfg, false, checkForNewCert, logger)
if err != nil {
logger.Errorw("error reading cloud config", "error", err)
logger.Debugw("error reading cloud config; will try again", "error", err)
continue
}
if cp, err := newConfig.CopyOnlyPublicFields(); err == nil {
Expand Down
4 changes: 2 additions & 2 deletions module/modmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (mgr *Manager) startModule(ctx context.Context, mod *module) error {

// create the module's data directory
if mod.dataDir != "" {
mgr.logger.Infof("Creating data directory %q for module %q", mod.dataDir, mod.cfg.Name)
mgr.logger.Debugf("Creating data directory %q for module %q", mod.dataDir, mod.cfg.Name)
if err := os.MkdirAll(mod.dataDir, 0o750); err != nil {
return errors.WithMessage(err, "error while creating data directory for module "+mod.cfg.Name)
}
Expand Down Expand Up @@ -1121,7 +1121,7 @@ func (m *module) startProcess(
moduleWorkingDirectory, ok := moduleEnvironment["VIAM_MODULE_ROOT"]
if !ok {
moduleWorkingDirectory = filepath.Dir(absoluteExePath)
logger.CWarnw(ctx, "VIAM_MODULE_ROOT was not passed to module. Defaulting to module's working directory",
logger.CDebugw(ctx, "VIAM_MODULE_ROOT was not passed to module. Defaulting to module's working directory",
"module", m.cfg.Name, "dir", moduleWorkingDirectory)
} else {
logger.CInfow(ctx, "Starting module in working directory", "module", m.cfg.Name, "dir", moduleWorkingDirectory)
Expand Down

0 comments on commit 0a250a2

Please sign in to comment.