Warn instead of failing when process username cannot be found

This commit is contained in:
Daniel 2024-11-12 15:10:41 +01:00
parent af3bb804bf
commit a99b68ec91

View file

@ -256,7 +256,7 @@ func loadProcess(ctx context.Context, key string, pInfo *processInfo.Process) (*
// Username
process.UserName, err = pInfo.UsernameWithContext(ctx)
if err != nil {
return nil, fmt.Errorf("process: failed to get Username for p%d: %w", pInfo.Pid, err)
log.Tracer(ctx).Warningf("process: failed to get username (PID %d): %s", pInfo.Pid, err)
}
// TODO: User Home