mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
simplify logger time and avoid possible crashes (#13986)
time.Format() is not necessary prematurely for JSON marshalling, since JSON marshalling indeed defaults to RFC3339Nano. This also ensures the 'time' is remembered until its logged and it is the same time when the 'caller' invoked 'log' functions.
This commit is contained in:
@@ -349,7 +349,7 @@ func logIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
Host: req.Host,
|
||||
RequestID: req.RequestID,
|
||||
UserAgent: req.UserAgent,
|
||||
Time: time.Now().UTC().Format(time.RFC3339Nano),
|
||||
Time: time.Now().UTC(),
|
||||
API: &log.API{
|
||||
Name: API,
|
||||
Args: &log.Args{
|
||||
|
||||
Reference in New Issue
Block a user