Skip to content

Commit

Permalink
Remove unnecessary pprof log line
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Oct 22, 2023
1 parent 73c6c25 commit 955aa4a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import (
// Start the profiler if the required environment variable is set.
func init() {
envVarName := "PPROFLISTEN"
hostPort := os.Getenv(envVarName)
switch {
case hostPort == "":
fmt.Fprintf(os.Stderr, "DEBUG: %s not set, profiler not started.\n", envVarName)
default:
if hostPort := os.Getenv(envVarName); hostPort != "" {
fmt.Fprintf(os.Stderr, "DEBUG: Starting pprof on %s\n", hostPort)
go fmt.Println(http.ListenAndServe(hostPort, nil))
}
Expand Down

0 comments on commit 955aa4a

Please sign in to comment.