Skip to content

Commit

Permalink
correct log
Browse files Browse the repository at this point in the history
  • Loading branch information
matgabriel committed Sep 17, 2019
1 parent 6959111 commit 41f2a75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ func (g *Gaz) InitPprof(serverPort int) {
if err != nil {
panic(err)
}
Sugar.Infof("Starting pprof on port %d", listener.Addr().(*net.TCPAddr).Port)
err = http.Serve(listener, nil)
if err != nil {
Sugar.Errorf("error trying to setup HTTP endpoint on port %d: %v", listener.Addr().(*net.TCPAddr).Port, err)
} else {
Sugar.Infof("Started pprof on port %d", listener.Addr().(*net.TCPAddr).Port)
Sugar.Infof("Stopped pprof")
}
}()
}

0 comments on commit 41f2a75

Please sign in to comment.