Skip to content

Commit

Permalink
use UTC time for logger
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTrustyDev committed Sep 26, 2023
1 parent 13dcafa commit d78a8d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions logging/default_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
logtypes "github.com/EscanBE/go-lib/logging/types"
"os"
"time"

"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand All @@ -20,6 +21,9 @@ type defaultLogger struct {

// NewDefaultLogger builds a new defaultLogger instance
func NewDefaultLogger() Logger {
zerolog.TimestampFunc = func() time.Time {
return time.Now().UTC()
}
result := &defaultLogger{
Logger: log.Logger,
}
Expand Down

0 comments on commit d78a8d4

Please sign in to comment.