-
Notifications
You must be signed in to change notification settings - Fork 347
Add instrumented service. #151
Add instrumented service. #151
Conversation
|
Should we convert those logs to something like debugf in logrus. I see that glog has severity level may be print those logs only if the logging level is set appropriately ? Instead of an instrumented code. |
|
@abhinandanpb I did this not for the log level. :) Just extract the log logic into an outside wrapper, so that we don't need to see this everywhere. :) More of a cleanup. |
pkg/server/instrumented_service.go
Outdated
| glog.V(2).Infof("RunPodSandbox with config %+v", r.GetConfig()) | ||
| defer func() { | ||
| if err != nil { | ||
| glog.Errorf("RunPodSandbox for %+v returns error %v", r.GetConfig().GetMetadata(), err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glog.Errorf("RunPodSandbox for %+v failed, err: %v", r.GetConfig().GetMetadata(), err)
would be better ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Signed-off-by: Lantao Liu <[email protected]>
f935cd4 to
195b525
Compare
|
LGTM |
mikebrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM nice
…rvice Add instrumented service.
Move all grpc handler logs into a instrumented service, so that we don't need to care about it in the real service.
Signed-off-by: Lantao Liu [email protected]