Upgrades, error logger

This commit is contained in:
2025-01-28 15:07:07 -05:00
parent 896225effc
commit 861214be5d
3 changed files with 58 additions and 18 deletions

View File

@ -2,8 +2,11 @@ package srv
import (
"context"
"fmt"
"log"
"net"
"net/http"
"os"
"time"
"github.com/prometheus/client_golang/prometheus/promhttp"
@ -117,6 +120,7 @@ func prepHTTPServer(opts *HTTPServerOpts) *http.Server {
WriteTimeout: writeTimeout,
IdleTimeout: idleTimeout,
Handler: handler,
ErrorLog: log.New(os.Stderr, fmt.Sprintf("Go-HTTP[%s]", cfg.Name), log.Flags()),
BaseContext: func(_ net.Listener) context.Context {
return opts.Ctx
},