Skip to content

Commit 55ac6e4

Browse files
authored
[Feature] Set Logger format (#1031)
1 parent db986e2 commit 55ac6e4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- (Bugfix) Allow missing `token` key in License secret
2323
- (Feature) Unify agency access
2424
- (Feature) Change DBServer Cleanup Logic
25+
- (Feature) Set Logger format
2526

2627
## [1.2.13](https://github.com/arangodb/kube-arangodb/tree/1.2.13) (2022-06-07)
2728
- (Bugfix) Fix arangosync members state inspection

pkg/logging/global.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,18 @@
2020

2121
package logging
2222

23-
import "github.com/rs/zerolog/log"
23+
import (
24+
"os"
25+
"time"
2426

25-
var global = NewFactory(log.Logger)
27+
"github.com/rs/zerolog"
28+
)
29+
30+
var global = NewFactory(zerolog.New(zerolog.ConsoleWriter{
31+
Out: os.Stdout,
32+
TimeFormat: time.RFC3339Nano,
33+
NoColor: true,
34+
}).With().Timestamp().Logger())
2635

2736
func Global() Factory {
2837
return global

0 commit comments

Comments
 (0)