mirror of
https://github.com/prometheus/prometheus
synced 2025-01-12 18:01:36 +00:00
Log HTTP server errors using common/log
change naming to be more descriptive. Fixes #1651 remove pointer receiver use common/log error logger
This commit is contained in:
parent
e1848445f4
commit
624717e801
@ -239,7 +239,12 @@ func (h *Handler) Reload() <-chan struct{} {
|
||||
// Run serves the HTTP endpoints.
|
||||
func (h *Handler) Run() {
|
||||
log.Infof("Listening on %s", h.options.ListenAddress)
|
||||
h.listenErrCh <- http.ListenAndServe(h.options.ListenAddress, h.router)
|
||||
server := &http.Server{
|
||||
Addr: h.options.ListenAddress,
|
||||
Handler: h.router,
|
||||
ErrorLog: log.NewErrorLogger(),
|
||||
}
|
||||
h.listenErrCh <- server.ListenAndServe()
|
||||
}
|
||||
|
||||
func (h *Handler) alerts(w http.ResponseWriter, r *http.Request) {
|
||||
|
Loading…
Reference in New Issue
Block a user