mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
web: log error missages on serving
This commit is contained in:
parent
9516d04472
commit
0af43695de
12
web/web.go
12
web/web.go
@ -346,8 +346,16 @@ func (h *Handler) Run(ctx context.Context) error {
|
||||
ReadTimeout: h.options.ReadTimeout,
|
||||
}
|
||||
|
||||
go httpSrv.Serve(httpl)
|
||||
go grpcSrv.Serve(grpcl)
|
||||
go func() {
|
||||
if err := httpSrv.Serve(httpl); err != nil {
|
||||
log.With("err", err).Warnf("error serving HTTP")
|
||||
}
|
||||
}()
|
||||
go func() {
|
||||
if err := grpcSrv.Serve(grpcl); err != nil {
|
||||
log.With("err", err).Warnf("error serving HTTP")
|
||||
}
|
||||
}()
|
||||
|
||||
return m.Serve()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user