From 96ab242154b30faee68046fa5584a0628c55f650 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Tue, 10 Jan 2017 22:26:44 -0800 Subject: [PATCH] Change timestamp value format to nano precision --- log/value.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log/value.go b/log/value.go index 2b0448ecb..a5dc5da33 100644 --- a/log/value.go +++ b/log/value.go @@ -42,11 +42,11 @@ func Timestamp(t func() time.Time) Valuer { var ( // DefaultTimestamp is a Valuer that returns the current wallclock time, // respecting time zones, when bound. - DefaultTimestamp Valuer = func() interface{} { return time.Now().Format(time.RFC3339) } + DefaultTimestamp Valuer = func() interface{} { return time.Now().Format(time.RFC3339Nano) } // DefaultTimestampUTC is a Valuer that returns the current time in UTC // when bound. - DefaultTimestampUTC Valuer = func() interface{} { return time.Now().UTC().Format(time.RFC3339) } + DefaultTimestampUTC Valuer = func() interface{} { return time.Now().UTC().Format(time.RFC3339Nano) } ) // Caller returns a Valuer that returns a file and line from a specified depth