Browse Source

Merge pull request #6124 from vieux/standadize_debug_iptables

use stderr to debug iptables
unclejack 11 years ago
parent
commit
0f40cedc23
1 changed files with 1 additions and 1 deletions
  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()