mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
[client] Fix duplicate log lines in containers (#5609)
This commit is contained in:
@@ -43,7 +43,13 @@ func InitLogger(logger *log.Logger, logLevel string, logs ...string) error {
|
||||
var writers []io.Writer
|
||||
logFmt := os.Getenv("NB_LOG_FORMAT")
|
||||
|
||||
seen := make(map[string]bool, len(logs))
|
||||
for _, logPath := range logs {
|
||||
if seen[logPath] {
|
||||
continue
|
||||
}
|
||||
seen[logPath] = true
|
||||
|
||||
switch logPath {
|
||||
case LogSyslog:
|
||||
AddSyslogHookToLogger(logger)
|
||||
|
||||
Reference in New Issue
Block a user