Browse Source

Use logger (not stdout) for unlisten error

Martin Hebnes Pedersen 2 years ago
parent
commit
2482502ff9
1 changed files with 1 additions and 2 deletions
  1. 1 2
      listen.go

+ 1 - 2
listen.go

@@ -5,7 +5,6 @@
 package main
 
 import (
-	"fmt"
 	"log"
 	"net"
 	"strings"
@@ -20,7 +19,7 @@ func Unlisten(param string) {
 	for _, method := range methods {
 		ok, err := listenHub.Disable(method)
 		if err != nil {
-			fmt.Printf("Unable to close %s listener: %s", method, err)
+			log.Printf("Unable to close %s listener: %s", method, err)
 		} else if !ok {
 			log.Printf("No active %s listener, ignoring.\n", method)
 		}