Skip to content
Snippets Groups Projects
Commit 495fae2c authored by Luca Moser's avatar Luca Moser
Browse files

fixes args in formatted prints

parent aa210a54
Branches
Tags
No related merge requests found
...@@ -27,7 +27,7 @@ func Configure(plugin *node.Plugin) { ...@@ -27,7 +27,7 @@ func Configure(plugin *node.Plugin) {
server.Events.Connect.Attach(events.NewClosure(HandleConnection)) server.Events.Connect.Attach(events.NewClosure(HandleConnection))
server.Events.Error.Attach(events.NewClosure(func(err error) { server.Events.Error.Attach(events.NewClosure(func(err error) {
log.Error("error in server: %s", err.Error()) log.Errorf("error in server: %s", err.Error())
})) }))
server.Events.Start.Attach(events.NewClosure(func() { server.Events.Start.Attach(events.NewClosure(func() {
log.Infof("Starting Server (port %d) ... done", parameter.NodeConfig.GetInt(CFG_SERVER_PORT)) log.Infof("Starting Server (port %d) ... done", parameter.NodeConfig.GetInt(CFG_SERVER_PORT))
......
package gracefulshutdown package gracefulshutdown
import ( import (
"github.com/iotaledger/hive.go/logger"
"os" "os"
"os/signal" "os/signal"
"strings" "strings"
...@@ -9,6 +8,7 @@ import ( ...@@ -9,6 +8,7 @@ import (
"time" "time"
"github.com/iotaledger/hive.go/daemon" "github.com/iotaledger/hive.go/daemon"
"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/node" "github.com/iotaledger/hive.go/node"
) )
...@@ -38,7 +38,7 @@ var PLUGIN = node.NewPlugin("Graceful Shutdown", node.Enabled, func(plugin *node ...@@ -38,7 +38,7 @@ var PLUGIN = node.NewPlugin("Graceful Shutdown", node.Enabled, func(plugin *node
if len(runningBackgroundWorkers) >= 1 { if len(runningBackgroundWorkers) >= 1 {
processList = "(" + strings.Join(runningBackgroundWorkers, ", ") + ") " processList = "(" + strings.Join(runningBackgroundWorkers, ", ") + ") "
} }
log.Warningf("Received shutdown request - waiting (max %d seconds) to finish processing ...", WAIT_TO_KILL_TIME_IN_SECONDS-int(secondsSinceStart), processList) log.Warningf("Received shutdown request - waiting (max %d seconds) to finish processing %s...", WAIT_TO_KILL_TIME_IN_SECONDS-int(secondsSinceStart), processList)
} else { } else {
log.Error("Background processes did not terminate in time! Forcing shutdown ...") log.Error("Background processes did not terminate in time! Forcing shutdown ...")
os.Exit(1) os.Exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment