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

Init Logger before Configs #825

Merged
merged 1 commit into from
Jan 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions metrictank.go
Original file line number Diff line number Diff line change
@@ -102,6 +102,11 @@ func init() {
func main() {
startupTime = time.Now()

/***********************************
Initialize Logger
***********************************/
log.NewLogger(0, "console", fmt.Sprintf(`{"level": %d, "formatting":false}`, logLevel))

/***********************************
Initialize Configuration
***********************************/
@@ -152,9 +157,8 @@ func main() {
config.ParseAll()

/***********************************
Initialize Logging
Set logging levels
***********************************/
log.NewLogger(0, "console", fmt.Sprintf(`{"level": %d, "formatting":false}`, logLevel))
mdata.LogLevel = logLevel
inKafkaMdm.LogLevel = logLevel
api.LogLevel = logLevel