Skip to content

Commit

Permalink
Update simpleredis.go
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlerebourg authored Dec 31, 2022
1 parent 55ae428 commit 9f10251
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions simpleredis.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"net/textproto"
"strings"
"time"

logger "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/pkg/logger"
)

// Error strings for redis.
Expand Down Expand Up @@ -47,9 +45,7 @@ func genRedisArray(params ...[]byte) []byte {

func send(wr *textproto.Writer, method string, data []byte) {
if err := wr.PrintfLine(string(data)); err != nil {
logger.Error(fmt.Sprintf("redis:%s %s", method, err.Error()))
} else {
logger.Debug(fmt.Sprintf("redis:%s", method))
fmt.Printf("redis:%s %s", method, err.Error())
}
}

Expand All @@ -62,7 +58,7 @@ func askRedis(hostnamePort string, cmd RedisCmd, channel chan RedisCmd) {
}
defer func() {
if err := conn.Close(); err != nil {
logger.Error(fmt.Sprintf("redis:connClose %s", err.Error()))
fmt.Printf("redis:connClose %s", err.Error())
}
}()

Expand Down

0 comments on commit 9f10251

Please sign in to comment.