From 173b560ca42969666810bd268e9add278bf1c0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Mrozi=C5=84ski?= Date: Tue, 5 Sep 2023 12:16:35 +0200 Subject: [PATCH] Fix before request hook logger mode (#1077) --- server/runtime_javascript.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/runtime_javascript.go b/server/runtime_javascript.go index 7d691906a7..8b661b9f29 100644 --- a/server/runtime_javascript.go +++ b/server/runtime_javascript.go @@ -394,7 +394,7 @@ func (rp *RuntimeProviderJS) BeforeReq(ctx context.Context, id string, logger *z return nil, errors.New("Could not run runtime Before function."), codes.Internal } - jsLogger, err := NewJsLogger(r.vm, logger, zap.String("api_id", strings.TrimPrefix(id, API_PREFIX_LOWERCASE)), zap.String("mode", RuntimeExecutionModeAfter.String())) + jsLogger, err := NewJsLogger(r.vm, logger, zap.String("api_id", strings.TrimPrefix(id, API_PREFIX_LOWERCASE)), zap.String("mode", RuntimeExecutionModeBefore.String())) if err != nil { rp.Put(r) logger.Error("Could not instantiate js logger.", zap.Error(err))