Skip to content

Commit

Permalink
Enhancements to debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Jun 13, 2023
1 parent d684209 commit 3636f45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion loxilb-ebpf
2 changes: 2 additions & 0 deletions loxinet/dpebpf_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,13 @@ func dpEbpfTicker() {
func DpEbpfDPLogLevel(cfg *C.struct_ebpfcfg, debug tk.LogLevelT) {
switch debug {
case tk.LogAlert:
cfg.loglevel = 5 // LOG_FATAL
case tk.LogCritical:
cfg.loglevel = 5 // LOG_FATAL
case tk.LogError:
cfg.loglevel = 4 // LOG_ERROR
case tk.LogWarning:
cfg.loglevel = 3 // LOG_WARNING
case tk.LogNotice:
cfg.loglevel = 3 // LOG_WARNING
case tk.LogInfo:
Expand Down
2 changes: 1 addition & 1 deletion loxinet/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func RunCommand(command string, isFatal bool) (int, error) {
// LogString2Level - Convert log level in string to LogLevelT
func LogString2Level(logStr string) tk.LogLevelT {
logLevel := tk.LogDebug
switch opts.Opts.LogLevel {
switch logStr {
case "info":
logLevel = tk.LogInfo
case "error":
Expand Down

0 comments on commit 3636f45

Please sign in to comment.