diff --git a/pkg/logs/logs.go b/pkg/logs/logs.go index 7ec1b91b4..c43d0fe5e 100644 --- a/pkg/logs/logs.go +++ b/pkg/logs/logs.go @@ -4,6 +4,7 @@ import ( "io" "log" "os" + "time" "github.com/sirupsen/logrus" ) @@ -49,7 +50,7 @@ func NewDevelopmentLogger(logPath string) *logrus.Entry { func formatted(log *logrus.Logger) *logrus.Entry { // highly recommended: tail -f development.log | humanlog // https://github.com/aybabtme/humanlog - log.Formatter = &logrus.JSONFormatter{} + log.Formatter = &logrus.JSONFormatter{TimestampFormat: time.RFC3339Nano} return log.WithFields(logrus.Fields{}) } diff --git a/pkg/logs/tail/tail.go b/pkg/logs/tail/tail.go index b21bc21e4..1cc5ef05e 100644 --- a/pkg/logs/tail/tail.go +++ b/pkg/logs/tail/tail.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "os" + "time" "github.com/aybabtme/humanlog" ) @@ -15,6 +16,7 @@ func TailLogs(logFilePath string) { opts := humanlog.DefaultOptions opts.Truncates = false + opts.TimeFormat = time.StampMilli _, err := os.Stat(logFilePath) if err != nil {