Skip to content

Commit

Permalink
put log entries under versbose level
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed May 20, 2024
1 parent 645f214 commit 2131b56
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,14 @@ func InList(a string, list []string) bool {
return false
}

// PatchMatched check if given paths are matched
// PathMatched check if given path are matched with rurl
func PathMatched(rurl, path string, strict bool) bool {
log.Printf("PatchMatched rurl=%s path=%s strict=%v", rurl, path, strict)
if v, err := url.QueryUnescape(rurl); err == nil {
rurl = v
}
log.Printf("PatchMatched rurl=%s path=%s strict=%v", rurl, path, strict)
if Config.Verbose > 2 {
log.Printf("PathMatched rurl=%s path=%s strict=%v", rurl, path, strict)
}
matched := false
if strings.HasSuffix(path, "/") {
if !strings.HasSuffix(rurl, "/") {
Expand Down Expand Up @@ -418,7 +419,9 @@ func PathMatched(rurl, path string, strict bool) bool {
matched = true
}
}
log.Printf("PatchMatched rurl=%s path=%s strict=%v matched %v", rurl, path, strict, matched)
if Config.Verbose > 1 {
log.Printf("PathMatched rurl=%s path=%s strict=%v matched %v", rurl, path, strict, matched)
}
return matched
}

Expand Down

0 comments on commit 2131b56

Please sign in to comment.