client: simplify gRPC logger initialization by removing console output handling

This commit is contained in:
Hakan Sariman
2025-03-28 00:49:41 +08:00
parent 274f50e63e
commit 2324196eed

View File

@@ -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
}