Skip to content

Commit c3724e5

Browse files
committed
rm redundant log fields
1 parent 43bacef commit c3724e5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bouncer/bouncer.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,19 @@ func (b *EnvoyBouncer) Bounce(ctx context.Context, ip string, headers map[string
138138
}
139139

140140
logger = logger.With(slog.String("ip", ip))
141-
logger.Debug("starting decision check", "check_ip", ip)
141+
logger.Debug("starting decision check")
142142

143143
entry, ok := b.cache.Get(ip)
144144
if ok {
145145
logger.Debug("cache hit", "entry", entry)
146146
if entry.Bounced {
147-
logger.Info("bouncing", "ip", ip)
147+
logger.Info("bouncing")
148148
return true, nil
149149
}
150150
}
151151

152152
if !isValidIP(ip) {
153-
logger.Error("invalid ip address", "ip", ip)
153+
logger.Error("invalid ip address")
154154
return false, errors.New("invalid ip address")
155155
}
156156

@@ -160,7 +160,7 @@ func (b *EnvoyBouncer) Bounce(ctx context.Context, ip string, headers map[string
160160
return false, err
161161
}
162162
if decisions == nil {
163-
logger.Debug("no decisions found for ip", "ip", ip)
163+
logger.Debug("no decisions found for ip")
164164
b.cache.Set(ip, false)
165165
return false, nil
166166
}
@@ -171,14 +171,14 @@ func (b *EnvoyBouncer) Bounce(ctx context.Context, ip string, headers map[string
171171
continue
172172
}
173173
if isBannedDecision(decision) {
174-
logger.Info("bouncing", "ip", ip)
174+
logger.Info("bouncing")
175175
b.cache.Set(ip, true)
176176
return true, nil
177177
}
178178
}
179179

180180
b.cache.Set(ip, false)
181-
logger.Debug("no ban decisions found for ip", "ip", ip)
181+
logger.Debug("no ban decisions found")
182182
return false, nil
183183
}
184184

0 commit comments

Comments
 (0)