mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Merge pull request #467 from neilalexander/debugtext
Send PPROF output text to stderr
This commit is contained in:
		
						commit
						6263fa287c
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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)) }()
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue