Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 3e35e99

Browse files
authored
Merge pull request #825 from bloomberg/bugfix/init-logging
Init Logger before Configs
2 parents ad6976a + d2e1459 commit 3e35e99

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

metrictank.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ func init() {
102102
func main() {
103103
startupTime = time.Now()
104104

105+
/***********************************
106+
Initialize Logger
107+
***********************************/
108+
log.NewLogger(0, "console", fmt.Sprintf(`{"level": %d, "formatting":false}`, logLevel))
109+
105110
/***********************************
106111
Initialize Configuration
107112
***********************************/
@@ -152,9 +157,8 @@ func main() {
152157
config.ParseAll()
153158

154159
/***********************************
155-
Initialize Logging
160+
Set logging levels
156161
***********************************/
157-
log.NewLogger(0, "console", fmt.Sprintf(`{"level": %d, "formatting":false}`, logLevel))
158162
mdata.LogLevel = logLevel
159163
inKafkaMdm.LogLevel = logLevel
160164
api.LogLevel = logLevel

0 commit comments

Comments
 (0)