mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-19 02:38:07 -05:00
15 lines
328 B
Go
15 lines
328 B
Go
package hcs
|
|
|
|
import "github.com/sirupsen/logrus"
|
|
|
|
func logOperationBegin(ctx logrus.Fields, msg string) {
|
|
logrus.WithFields(ctx).Debug(msg)
|
|
}
|
|
|
|
func logOperationEnd(ctx logrus.Fields, msg string, err error) {
|
|
if err == nil {
|
|
logrus.WithFields(ctx).Debug(msg)
|
|
} else {
|
|
logrus.WithFields(ctx).WithError(err).Error(msg)
|
|
}
|
|
}
|