Used WithField() and Logf() where required.
Used elektronLogger#WithField(...) for single key-value pair. Used elektronLogger#Logf(...) where formatted string is required.
This commit is contained in:
parent
3b70a13cc8
commit
12f827c0fe
7 changed files with 91 additions and 72 deletions
|
@ -36,7 +36,7 @@ import (
|
|||
func coLocated(tasks map[string]bool, s BaseScheduler) {
|
||||
|
||||
for _, task := range tasks {
|
||||
elekLog.WithFields(log.Fields{"Task": task}).Log(CONSOLE, log.InfoLevel, "")
|
||||
elekLog.WithField("Task", fmt.Sprintf("%v", task)).Log(CONSOLE, log.InfoLevel, "")
|
||||
}
|
||||
|
||||
elekLog.Log(CONSOLE, log.InfoLevel, "---------------------")
|
||||
|
|
Reference in a new issue