mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
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:
parent
e7a043271d
commit
e83a51c1e1
@ -152,12 +152,12 @@ func parseTime(ctx context.Context, createTime string) (*timestamp.Timestamp, er
|
||||
var t time.Time
|
||||
t, err := time.Parse(layout, createTime)
|
||||
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
|
||||
}
|
||||
tm, err = ptypes.TimestampProto(t)
|
||||
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, nil
|
||||
|
Loading…
Reference in New Issue
Block a user