mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08: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 a new issue