Skip to content

Commit

Permalink
Output timestamp with nanosecond precision if available (#4006)
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
  • Loading branch information
Danny Kopping authored Jul 19, 2021
1 parent 1ed19f7 commit b72a470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/pkg/promtail/client/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (l *logger) Chan() chan<- api.Entry {

func (l *logger) run() {
for e := range l.entries {
fmt.Fprint(l.Writer, blue.Sprint(e.Timestamp.Format("2006-01-02T15:04:05-0700")))
fmt.Fprint(l.Writer, blue.Sprint(e.Timestamp.Format("2006-01-02T15:04:05.999999999-0700")))
fmt.Fprint(l.Writer, "\t")
fmt.Fprint(l.Writer, yellow.Sprint(e.Labels.String()))
fmt.Fprint(l.Writer, "\t")
Expand Down

0 comments on commit b72a470

Please sign in to comment.