cephfs: replace Errorf with ErrorLog in parseTime

replace Errorf with ErrorLog in parseTime
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:51:44 +05:30 committed by mergify[bot]
parent e7a043271d
commit e83a51c1e1

View File

@ -152,12 +152,12 @@ func parseTime(ctx context.Context, createTime string) (*timestamp.Timestamp, er
var t time.Time var t time.Time
t, err := time.Parse(layout, createTime) t, err := time.Parse(layout, createTime)
if err != nil { if err != nil {
klog.Errorf(util.Log(ctx, "failed to parse time %s %v"), createTime, err) util.ErrorLog(ctx, "failed to parse time %s %v", createTime, err)
return tm, err return tm, err
} }
tm, err = ptypes.TimestampProto(t) tm, err = ptypes.TimestampProto(t)
if err != nil { if err != nil {
klog.Errorf(util.Log(ctx, "failed to convert time %s %v"), createTime, err) util.ErrorLog(ctx, "failed to convert time %s %v", createTime, err)
return tm, err return tm, err
} }
return tm, nil return tm, nil