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
+2 -6
View File
@@ -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
} }