فهرست منبع

use stderr to debug iptables

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Victor Vieux 11 سال پیش
والد
کامیت
5708aa62f3
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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()