We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d126c6 commit 41d8cdeCopy full SHA for 41d8cde
pkg/logging/logger.go
@@ -29,6 +29,7 @@ import (
29
"os"
30
"strings"
31
"sync"
32
+ "time"
33
34
"github.com/rs/zerolog"
35
)
@@ -51,6 +52,12 @@ var (
51
52
}
53
54
55
+func init() {
56
+ zerolog.TimestampFunc = func() time.Time {
57
+ return time.Now().UTC()
58
+ }
59
+}
60
+
61
// Service exposes the interfaces for a logger service
62
// that supports different loggers with different levels.
63
type Service interface {
@@ -79,7 +86,7 @@ type LoggerOutputOptions struct {
79
86
80
87
81
88
func configureLogger(lg zerolog.ConsoleWriter) zerolog.ConsoleWriter {
82
- lg.TimeFormat = "2006-01-02T15:04:05-07:00"
89
+ lg.TimeFormat = time.RFC3339
83
90
84
91
lg.FormatLevel = func(i interface{}) string {
85
92
return fmt.Sprintf("|%s|", strings.ToUpper(fmt.Sprintf("%s", i)))
0 commit comments