瀏覽代碼

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()