Skip to content

Commit a8ef461

Browse files
authored
logging: full standard timestamp with timezone (yyyy-mm-dd) (#100)
1 parent cd33466 commit a8ef461

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/cfg/logging.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"io"
66
"os"
77
"path/filepath"
8+
"time"
89

910
log "github.com/sirupsen/logrus"
1011
"github.com/sirupsen/logrus/hooks/writer"
@@ -90,7 +91,7 @@ func (c *LoggingConfig) setup(fileName string) error {
9091
return nil
9192
}
9293

93-
log.SetFormatter(&log.TextFormatter{TimestampFormat: "02-01-2006 15:04:05", FullTimestamp: true})
94+
log.SetFormatter(&log.TextFormatter{TimestampFormat: time.RFC3339, FullTimestamp: true})
9495

9596
logger, err := c.LoggerForFile(fileName)
9697
if err != nil {

0 commit comments

Comments
 (0)