Switch to debug logging when locating runtimes

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-05-05 08:59:17 +02:00
parent c76946cbcc
commit 335de5a352

View File

@ -32,6 +32,7 @@ func NewLowLevelRuntime(logger *log.Logger, candidates []string) (Runtime, error
return nil, fmt.Errorf("error locating runtime: %v", err) return nil, fmt.Errorf("error locating runtime: %v", err)
} }
logger.Infof("Using low-level runtime %v", runtimePath)
return NewRuntimeForPath(logger, runtimePath) return NewRuntimeForPath(logger, runtimePath)
} }
@ -43,13 +44,13 @@ func findRuntime(logger *log.Logger, candidates []string) (string, error) {
} }
for _, candidate := range candidates { for _, candidate := range candidates {
logger.Infof("Looking for runtime binary '%v'", candidate) logger.Debugf("Looking for runtime binary '%v'", candidate)
runcPath, err := exec.LookPath(candidate) runcPath, err := exec.LookPath(candidate)
if err == nil { if err == nil {
logger.Infof("Found runtime binary '%v'", runcPath) logger.Debugf("Found runtime binary '%v'", runcPath)
return runcPath, nil return runcPath, nil
} }
logger.Warnf("Runtime binary '%v' not found: %v", candidate, err) logger.Debugf("Runtime binary '%v' not found: %v", candidate, err)
} }
return "", fmt.Errorf("no runtime binary found from candidate list: %v", candidates) return "", fmt.Errorf("no runtime binary found from candidate list: %v", candidates)