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:
Pradyumna Kaushik 2019-12-05 22:33:28 -05:00
parent 3b70a13cc8
commit 12f827c0fe
7 changed files with 91 additions and 72 deletions

View file

@ -285,8 +285,10 @@ func main() {
// Starting the scheduler driver.
if status, err := driver.Run(); err != nil {
elekLog.WithFields(log.Fields{"status": status.String(), "error": err.Error()}).Log(CONSOLE,
log.ErrorLevel, "Framework stopped ")
elekLog.WithFields(log.Fields{
"status": status.String(),
"error": err.Error(),
}).Log(CONSOLE, log.ErrorLevel, "Framework stopped ")
}
elekLog.Log(CONSOLE, log.InfoLevel, "Exiting...")
}