Skip to content

Commit a92df5a

Browse files
committed
Try a default log level
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent dd2876d commit a92df5a

File tree

1 file changed

+2
-2
lines changed
  • template/golang-middleware-inproc/function

1 file changed

+2
-2
lines changed

template/golang-middleware-inproc/function/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
func Handle(w http.ResponseWriter, r *http.Request) {
1414
var input []byte
1515

16-
log := slog.New(slog.NewTextHandler(os.Stdout, opts))
17-
log = log.With("X-Call-Id", r.Header.Get("X-Call-Id"))
16+
log := slog.New(slog.NewTextHandler(os.Stdout, nil)).
17+
With("X-Call-Id", r.Header.Get("X-Call-Id"))
1818

1919
log.Info("received request")
2020

0 commit comments

Comments
 (0)