Skip to content

Commit 466573f

Browse files
committed
Try a default log level
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent d8cbae8 commit 466573f

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)