Browse Source

Handle ipfslog.SetLogLevel error

Leo 5 years ago
parent
commit
a1dcc36df9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bridge/cmd/guardiand/main.go

+ 3 - 1
bridge/cmd/guardiand/main.go

@@ -96,7 +96,9 @@ func main() {
 	ipfslog.SetAllLoggers(lvl)
 
 	// Mute chatty subsystems.
-	ipfslog.SetLogLevel("swarm2", "error") // connection errors
+	if err := ipfslog.SetLogLevel("swarm2", "error"); err != nil {
+		panic(err)
+	} // connection errors
 
 	// Verify flags
 	if *nodeKeyPath == "" {