Skip to content

Commit

Permalink
remove debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
Neng Wan committed Oct 24, 2023
1 parent 0b36939 commit c169840
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/service/ratelimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ func (this *service) shouldRateLimitWorker(
limitsToCheck, isUnlimited := this.constructLimitsToCheck(request, ctx, snappedConfig)

s := settings.NewSettings()
fmt.Println("DEBUG in shouldRateLimitWorker", s.BlackListIPNetString, s.BlackListUIDString, s.WhiteListIPNetString, s.WhiteListUIDString)
responseDescriptorStatuses := this.cache.DoLimit(ctx, request, limitsToCheck, s.ForceFlag, s.IPFilter, s.UIDFilter, s.OnlyLogOnLimit)
assert.Assert(len(limitsToCheck) == len(responseDescriptorStatuses))

Expand Down
6 changes: 0 additions & 6 deletions src/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package settings
import (
"context"
"crypto/tls"
"fmt"
"log"
"net"
"strings"
Expand Down Expand Up @@ -226,11 +225,8 @@ func NewSettings() Settings {
Addr: s.RedisUrl,
Password: s.RedisAuth,
})
fmt.Println("DEBUG redis config: ", s.RedisUrl, s.RedisAuth)

if s.EnableDynamicConfig {
fmt.Println("DEBUG enable dynamic config")

dc := dynamicConfig{}
h, err := harvester.New(&dc, chNotify,
harvester.WithRedisSeed(redisClient),
Expand All @@ -244,8 +240,6 @@ func NewSettings() Settings {
if err != nil {
log.Fatalf("failed to harvest configuration: %v", err)
}
fmt.Println("DEBUG dynamicConfig: ", dc.WhiteListIPNetString.Get(), dc.WhiteListUIDString.Get(), dc.BlackListIPNetString.Get(), dc.BlackListUIDString.Get())

s.WhiteListIPNetString = dc.WhiteListIPNetString.Get()
s.BlackListIPNetString = dc.BlackListIPNetString.Get()
s.WhiteListUIDString = dc.WhiteListUIDString.Get()
Expand Down

0 comments on commit c169840

Please sign in to comment.