diff options
Diffstat (limited to 'pkg/backend/run.go')
-rw-r--r-- | pkg/backend/run.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/backend/run.go b/pkg/backend/run.go index dd7f3bf..a6d2f03 100644 --- a/pkg/backend/run.go +++ b/pkg/backend/run.go @@ -2,9 +2,8 @@ package backend import ( "context" - "fmt" "io" - "log" + "log/slog" "net" "net/http" @@ -41,9 +40,9 @@ func Run( Handler: logger.Middleware(mux, false), } go func() { - log.Printf("listening on %s\n", httpServer.Addr) + slog.Info("backend http server listening", "address", httpServer.Addr) if err := httpServer.ListenAndServe(); err != nil && err != http.ErrServerClosed { - _, _ = fmt.Fprintf(stderr, "error listening and serving: %+v\n", err) + slog.Error("error listening and serving backend http server", "address", httpServer.Addr, "error", err) } }() |