mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 10:05:17 +00:00
Remove unnecessary pprof log line
This commit is contained in:
parent
73c6c25bd9
commit
955aa4af79
@ -10,11 +10,7 @@ import (
|
|||||||
// Start the profiler if the required environment variable is set.
|
// Start the profiler if the required environment variable is set.
|
||||||
func init() {
|
func init() {
|
||||||
envVarName := "PPROFLISTEN"
|
envVarName := "PPROFLISTEN"
|
||||||
hostPort := os.Getenv(envVarName)
|
if hostPort := os.Getenv(envVarName); hostPort != "" {
|
||||||
switch {
|
|
||||||
case hostPort == "":
|
|
||||||
fmt.Fprintf(os.Stderr, "DEBUG: %s not set, profiler not started.\n", envVarName)
|
|
||||||
default:
|
|
||||||
fmt.Fprintf(os.Stderr, "DEBUG: Starting pprof on %s\n", hostPort)
|
fmt.Fprintf(os.Stderr, "DEBUG: Starting pprof on %s\n", hostPort)
|
||||||
go fmt.Println(http.ListenAndServe(hostPort, nil))
|
go fmt.Println(http.ListenAndServe(hostPort, nil))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user