Explorar o código

use stderr to debug iptables

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Victor Vieux %!s(int64=11) %!d(string=hai) anos
pai
achega
5708aa62f3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/iptables/iptables.go

+ 1 - 1
pkg/iptables/iptables.go

@@ -158,7 +158,7 @@ func Raw(args ...string) ([]byte, error) {
 	}
 
 	if os.Getenv("DEBUG") != "" {
-		fmt.Printf("[DEBUG] [iptables]: %s, %v\n", path, args)
+		fmt.Fprintf(os.Stderr, fmt.Sprintf("[debug] %s, %v\n", path, args))
 	}
 
 	output, err := exec.Command(path, args...).CombinedOutput()