func makePingKeepAlive(db *gorm.DB, host string, typeData string, node string) {
for {
pingErr := db.DB().Ping()
if pingErr != nil {
logger.Error(fmt.Sprintf("couldn't make ping to [Host: %s], Type: [%s], Node: [%s] Error: [%v]",
host, typeData, node, pingErr))
} else {
logger.Debug(fmt.Printf("Successful ping: %s, Type: %s, Node: %s", host, typeData, node))
}
time.Sleep(time.Duration(60) * time.Second)
}
}
Shouldn't it be "Sprintf" instead of "Printf" in the logger.debug statement in the else path (analog to the logger.Error statement)?
Hi,
I'm having an issue with the print statement in the ping keep alive function:
Shouldn't it be "Sprintf" instead of "Printf" in the logger.debug statement in the else path (analog to the logger.Error statement)?
homer-app/main.go
Line 2096 in b30c6e3
Greetings
Tom