From e4b76edd965cd9ad79cc7c455f841c9a7b8083d9 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Wed, 26 Oct 2016 12:45:29 -0700 Subject: [PATCH] Add timestamps to logs Signed-off-by: Mrunal Patel --- cmd/server/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 8d75e922..52341d88 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -149,6 +149,13 @@ func main() { return err } + cf := &logrus.TextFormatter{ + TimestampFormat: "2006-01-02 15:04:05.000000000Z07:00", + FullTimestamp: true, + } + + logrus.SetFormatter(cf) + if c.GlobalBool("debug") { logrus.SetLevel(logrus.DebugLevel) }