Make loggers io.Writer implementations, not directly lumberjack objects
This commit is contained in:
parent
7bec554709
commit
10710def50
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -16,7 +17,7 @@ import (
|
|||
type PluginBlockIP struct {
|
||||
blockedPrefixes *iradix.Tree
|
||||
blockedIPs map[string]interface{}
|
||||
logger *lumberjack.Logger
|
||||
logger io.Writer
|
||||
format string
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -16,7 +17,7 @@ import (
|
|||
type BlockedNames struct {
|
||||
allWeeklyRanges *map[string]WeeklyRanges
|
||||
patternMatcher *PatternMatcher
|
||||
logger *lumberjack.Logger
|
||||
logger io.Writer
|
||||
format string
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
|
@ -12,7 +13,7 @@ import (
|
|||
)
|
||||
|
||||
type PluginNxLog struct {
|
||||
logger *lumberjack.Logger
|
||||
logger io.Writer
|
||||
format string
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -13,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
type PluginQueryLog struct {
|
||||
logger *lumberjack.Logger
|
||||
logger io.Writer
|
||||
format string
|
||||
ignoredQtypes []string
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -16,7 +17,7 @@ import (
|
|||
type PluginWhitelistName struct {
|
||||
allWeeklyRanges *map[string]WeeklyRanges
|
||||
patternMatcher *PatternMatcher
|
||||
logger *lumberjack.Logger
|
||||
logger io.Writer
|
||||
format string
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue