Update log/handler_glog.go

This commit is contained in:
Martin HS 2024-02-07 21:09:36 +01:00 committed by GitHub
parent 5e60ff7a47
commit 6c9f2a47ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -192,7 +192,7 @@ func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error {
frame, _ := fs.Next()
for _, rule := range h.patterns {
if rule.pattern.MatchString(fmt.Sprintf("%s", frame.File)) {
if rule.pattern.MatchString(fmt.Sprintf("+%s", frame.File)) {
h.siteCache[r.PC], lvl, ok = rule.level, rule.level, true
}
}