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