Skip to content

Commit

Permalink
log intercepts
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Sep 4, 2023
1 parent d5b0993 commit 6651cbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shared/combined_handler.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package shared

import "log"

type CombinedHandler struct {
handlers []InterceptHandler
}
Expand All @@ -11,8 +13,9 @@ func NewCombinedHandler(handlers ...InterceptHandler) *CombinedHandler {
}

func (c *CombinedHandler) Intercept(req InterceptRequest) InterceptResult {
for _, handler := range c.handlers {
for i, handler := range c.handlers {
res := handler.Intercept(req)
log.Printf("Intercept %+v. Interceptor %d returns %+v", req, i, res)
if res.Action != INTERCEPT_RESUME {
return res
}
Expand Down

0 comments on commit 6651cbd

Please sign in to comment.