Skip to content

Commit

Permalink
Fix before request hook logger mode (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejmrozinski authored Sep 5, 2023
1 parent 577907a commit 173b560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/runtime_javascript.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 173b560

Please sign in to comment.