mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-03 20:19:07 +02:00
client: simplify gRPC logger initialization by removing console output handling
This commit is contained in:
+2
-6
@@ -50,12 +50,8 @@ func InitLog(logLevel string, logPath string) error {
|
|||||||
}
|
}
|
||||||
log.SetLevel(level)
|
log.SetLevel(level)
|
||||||
|
|
||||||
if logPath == "console" {
|
logOut := log.StandardLogger().Out
|
||||||
grpclog.SetLoggerV2(grpclog.NewLoggerV2(io.Discard, io.Discard, io.Discard))
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(logOut, logOut, logOut))
|
||||||
} else {
|
|
||||||
logOut := log.StandardLogger().Out
|
|
||||||
grpclog.SetLoggerV2(grpclog.NewLoggerV2(logOut, logOut, logOut))
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user