Direct logging to more useful places

This commit is contained in:
Neil Alexander 2020-05-11 14:02:19 +01:00
parent 9c08334159
commit db15ab10b9

View file

@ -84,9 +84,9 @@ func callerPrettyfier(f *runtime.Frame) (string, string) {
// simplest, and it gives us the freedom to run pprof on a separate port.
func SetupPprof() {
if hostPort := os.Getenv("PPROFLISTEN"); hostPort != "" {
logrus.Print("Starting pprof on", hostPort)
logrus.Warn("Starting pprof on", hostPort)
go func() {
logrus.WithError(http.ListenAndServe(hostPort, nil)).Print("Failed to setup pprof listener")
logrus.WithError(http.ListenAndServe(hostPort, nil)).Error("Failed to setup pprof listener")
}()
}
}