PMM-12893 Fix handler logger

This commit is contained in:
Artem Gavrilov 2024-02-20 16:52:55 +02:00
parent 5c8b4e27d9
commit 96b7d12d15

View File

@ -4,6 +4,7 @@ import (
"context"
"crypto/sha256"
"fmt"
stdlog "log"
"net/http"
"os"
"path/filepath"
@ -88,7 +89,7 @@ func Handler(logger log.Logger, dsns []string, connSema *semaphore.Weighted, glo
// Delegate http serving to Prometheus client library, which will call collector.Collect.
h := promhttp.HandlerFor(registry, promhttp.HandlerOpts{
ErrorHandling: promhttp.ContinueOnError,
// ErrorLog: logger, //TODO!!!
ErrorLog: stdlog.New(log.NewStdlibAdapter(logger), "handler", 0),
})
h.ServeHTTP(w, r)