From 34ac5c9197242b3c2a025a5d7634534185b410af Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sat, 20 Jul 2019 21:56:53 +0100 Subject: [PATCH] Send PPROF output text to stderr instead of stdout so that it doesn't break -genconf --- src/yggdrasil/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yggdrasil/debug.go b/src/yggdrasil/debug.go index 5cb7c46a..ff3bbe70 100644 --- a/src/yggdrasil/debug.go +++ b/src/yggdrasil/debug.go @@ -35,9 +35,9 @@ func init() { hostPort := os.Getenv(envVarName) switch { case hostPort == "": - fmt.Printf("DEBUG: %s not set, profiler not started.\n", envVarName) + fmt.Fprintf(os.Stderr, "DEBUG: %s not set, profiler not started.\n", envVarName) default: - fmt.Printf("DEBUG: Starting pprof on %s\n", hostPort) + fmt.Fprintf(os.Stderr, "DEBUG: Starting pprof on %s\n", hostPort) go func() { fmt.Println(http.ListenAndServe(hostPort, nil)) }() } }