mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 19:48:59 +02:00
✨ feat(logs) add supports write logs to files (#217)
* ✨ feat(logs) add supports write logs to files * fix(lint) 🚨 fix go lint * 🐛 fix(bug) check path is done only if provided * 📝 doc(vars) add LogFilePath to vars * 🦺 chore(review) update doc, configuration check and logger
This commit is contained in:
Vendored
+3
-3
@@ -11,7 +11,7 @@ import (
|
||||
func Test_Get(t *testing.T) {
|
||||
IPInCache := "10.0.0.10"
|
||||
IPNotInCache := "10.0.0.20"
|
||||
client := &Client{cache: &localCache{}, log: logger.New("INFO")}
|
||||
client := &Client{cache: &localCache{}, log: logger.New("INFO", "")}
|
||||
client.Set(IPInCache, BannedValue, 10)
|
||||
type args struct {
|
||||
clientIP string
|
||||
@@ -47,7 +47,7 @@ func Test_Get(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_Set(t *testing.T) {
|
||||
client := &Client{cache: &localCache{}, log: logger.New("INFO")}
|
||||
client := &Client{cache: &localCache{}, log: logger.New("INFO", "")}
|
||||
IPInCache := "10.0.0.11"
|
||||
type args struct {
|
||||
clientIP string
|
||||
@@ -88,7 +88,7 @@ func Test_Set(t *testing.T) {
|
||||
func Test_Delete(t *testing.T) {
|
||||
IPInCache := "10.0.0.12"
|
||||
IPNotInCache := "10.0.0.22"
|
||||
client := &Client{cache: &localCache{}, log: logger.New("INFO")}
|
||||
client := &Client{cache: &localCache{}, log: logger.New("INFO", "")}
|
||||
client.Set(IPInCache, BannedValue, 10)
|
||||
type args struct {
|
||||
clientIP string
|
||||
|
||||
Reference in New Issue
Block a user