Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix log level. #419

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions api/loxinlp/nlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ func AddNeigh(neigh nlp.Neigh, link nlp.Link) int {
brId = vxlan.VxlanId
ftype = cmn.FdbTun
} else {
tk.LogIt(tk.LogError, "[NLP] L2fdb %v brId %v dst %v dev %v IGNORED\n", mac[:], brId, dst, name)
tk.LogIt(tk.LogInfo, "[NLP] L2fdb %v brId %v dst %v dev %v IGNORED\n", mac[:], brId, dst, name)
return 0
}
} else {
Expand Down Expand Up @@ -1037,7 +1037,7 @@ func DelNeigh(neigh nlp.Neigh, link nlp.Link) int {
tk.LogIt(tk.LogError, "[NLP] NH %v %v del failed\n", neigh.IP.String(), name)
ret = -1
} else {
tk.LogIt(tk.LogError, "[NLP] NH %v %v deleted\n", neigh.IP.String(), name)
tk.LogIt(tk.LogInfo, "[NLP] NH %v %v deleted\n", neigh.IP.String(), name)
}

} else {
Expand Down Expand Up @@ -1121,10 +1121,10 @@ func AddRoute(route nlp.Route) int {
}
} else {
if route.Gw != nil {
tk.LogIt(tk.LogError, "[NLP] RT %s via %s added\n", ipNet.String(),
tk.LogIt(tk.LogInfo, "[NLP] RT %s via %s added\n", ipNet.String(),
route.Gw.String())
} else {
tk.LogIt(tk.LogError, "[NLP] RT %s added\n", ipNet.String())
tk.LogIt(tk.LogInfo, "[NLP] RT %s added\n", ipNet.String())
}
}

Expand Down Expand Up @@ -1184,10 +1184,10 @@ func DelRoute(route nlp.Route) int {
}
} else {
if route.Gw != nil {
tk.LogIt(tk.LogError, "[NLP] RT %s via %s deleted\n", ipNet.String(),
tk.LogIt(tk.LogInfo, "[NLP] RT %s via %s deleted\n", ipNet.String(),
route.Gw.String())
} else {
tk.LogIt(tk.LogError, "[NLP] RT %s deleted\n", ipNet.String())
tk.LogIt(tk.LogInfo, "[NLP] RT %s deleted\n", ipNet.String())
}
}
return ret
Expand Down
5 changes: 3 additions & 2 deletions loxinet/dpebpf_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ import (
"time"
"unsafe"

cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"
nlp "github.com/vishvananda/netlink"

cmn "github.com/loxilb-io/loxilb/common"
)

// This file implements the interface DpHookInterface
Expand Down Expand Up @@ -1985,7 +1986,7 @@ func (e *DpEbpfH) DpCtDel(w *DpCtInfo) int {
mapKey := w.Key()
cti := mh.dpEbpf.ctMap[mapKey]
if cti == nil {
tk.LogIt(tk.LogError, "ctInfo-key (%v) not present\n", mapKey)
tk.LogIt(tk.LogDebug, "ctInfo-key (%v) not present\n", mapKey)
return 0
}

Expand Down
12 changes: 7 additions & 5 deletions loxinet/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/loxilb-io/loxilb/api/loxinlp"
cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"
probing "github.com/prometheus-community/pro-bing"
"io/ioutil"
"net"
"reflect"
"sort"
"strconv"
"sync"
"time"

tk "github.com/loxilb-io/loxilib"
probing "github.com/prometheus-community/pro-bing"

"github.com/loxilb-io/loxilb/api/loxinlp"
cmn "github.com/loxilb-io/loxilb/common"
)

// error codes
Expand Down Expand Up @@ -357,7 +359,7 @@ func RulesInit(zone *Zone) *RuleH {
tk.LogIt(tk.LogError, "RootCA cert load failed : %v\n", err)
} else {
nRh.rootCAPool.AppendCertsFromPEM(rootCA)
tk.LogIt(tk.LogError, "RootCA cert loaded\n")
tk.LogIt(tk.LogDebug, "RootCA cert loaded\n")
}
}

Expand Down
Loading