Quellcode durchsuchen

use stderr to debug iptables

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Victor Vieux vor 11 Jahren
Ursprung
Commit
5708aa62f3
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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") != "" {
 	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()
 	output, err := exec.Command(path, args...).CombinedOutput()