Skip to content

Commit

Permalink
set quench log prefix based on reported quench log level
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszWojciechO committed Dec 20, 2024
1 parent 2015369 commit 703236f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion daemon/vpn/quench/libquench.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,19 @@ const (
type Logger struct{}

func (l *Logger) Log(logLevel quenchBindigns.LogLevel, message string) {
log.Println(internal.DebugPrefix, quenchPrefix, message)
logPrefix := ""
//nolint:exhaustive // We do not use prefixes for other log levels
switch logLevel {
case quenchBindigns.LogLevelInfo:
logPrefix = internal.InfoPrefix
case quenchBindigns.LogLevelDebug:
logPrefix = internal.DebugPrefix
case quenchBindigns.LogLevelError:
logPrefix = internal.ErrorPrefix
default:
logPrefix = internal.DebugPrefix
}
log.Println(logPrefix, quenchPrefix, message)
}

type Observer struct {
Expand Down

0 comments on commit 703236f

Please sign in to comment.