Change "Invalid IP" msgs to info loglevel
This commit is contained in:
parent
874b1c541a
commit
6e9947809c
@ -26,7 +26,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version = "1.0.0-rc3"
|
version = "1.0.0-rc4"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -227,7 +227,12 @@ func handleConnection(connClt net.Conn, conLdap *ldap.Conn) {
|
|||||||
// First query netCache built with ipNetworkNumber
|
// First query netCache built with ipNetworkNumber
|
||||||
res, err := isIPContainedInNetCache(ip)
|
res, err := isIPContainedInNetCache(ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logstream.Error(err.Error())
|
if strings.EqualFold(err.Error(), fmt.Sprintf("Invalid IP: %s", ip)) {
|
||||||
|
// We don't want those msg to pollute logs
|
||||||
|
logstream.Info(err.Error())
|
||||||
|
} else {
|
||||||
|
logstream.Error(err.Error())
|
||||||
|
}
|
||||||
sendResponse(connClt, err.Error(), 500)
|
sendResponse(connClt, err.Error(), 500)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user