Skip to content

Commit

Permalink
tetragon: Move some Info/Warn messages to Debug
Browse files Browse the repository at this point in the history
Moving some extra Info/Warn messages to Debug lovel.

Also adjusting a bit Programs/Maps loading messages to make
it more readable.

Signed-off-by: Jiri Olsa <[email protected]>
  • Loading branch information
olsajiri authored and kkourt committed Aug 25, 2022
1 parent 9e8c9b2 commit ca67ab3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/sensors/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (s *Sensor) Load(stopCtx context.Context, bpfDir, mapDir, ciliumDir string)
return err
}
p.LoadState.RefInc()
l.WithField("prog", p.Name).WithField("label", p.Label).Info("BPF prog was loaded")
l.WithField("prog", p.Name).WithField("label", p.Label).Debugf("BPF prog was loaded")
}
l.WithField("sensor", s.Name).Infof("Loaded BPF maps and events for sensor successfully")
s.Loaded = true
Expand Down
8 changes: 4 additions & 4 deletions pkg/sensors/program/coll.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ func newLoadedCollection() *LoadedCollection {
}

func printLoadedCollection(str string, lc *LoadedCollection) {
logger.GetLogger().Infof("Programs (%s):", str)
logger.GetLogger().Debugf("Programs (%s):", str)
for name, lp := range lc.Programs {
logger.GetLogger().Infof("%d: %s - %v", lp.ID, name, lp.MapIDs)
logger.GetLogger().Debugf(" - %d: %s - %v", lp.ID, name, lp.MapIDs)
}
logger.GetLogger().Infof("Maps (%s):", str)
logger.GetLogger().Debugf("Maps (%s):", str)
for name, lm := range lc.Maps {
logger.GetLogger().Infof("%d: %s", lm.ID, name)
logger.GetLogger().Debugf(" - %d: %s", lm.ID, name)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/sensors/program/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func doLoadProgram(
pinPath := filepath.Join(bpfDir, load.PinPath)

if _, err := os.Stat(pinPath); err == nil {
logger.GetLogger().Warnf("Pin file '%s' already exists, repinning", load.PinPath)
logger.GetLogger().Debugf("Pin file '%s' already exists, repinning", load.PinPath)
if err := os.Remove(pinPath); err != nil {
logger.GetLogger().Warnf("Unpinning '%s' failed: %s", pinPath, err)
}
Expand Down

0 comments on commit ca67ab3

Please sign in to comment.