From 268be523fb1142138a3f710642b5773453841eeb Mon Sep 17 00:00:00 2001 From: "priyanka.akhade" Date: Thu, 18 Jun 2020 15:11:08 +0530 Subject: code improvements Signed-off-by: priyanka.akhade Issue-ID: CLI-270 Change-Id: If9eab4bc8642c7c20a841d58c8a9e2bf5ae6c98b --- .../java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'grpc/grpc-server') diff --git a/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java b/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java index d59416c7..9f236e5c 100644 --- a/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java +++ b/grpc/grpc-server/src/main/java/org/open/infc/grpc/server/OpenInterfaceGrpcServer.java @@ -75,7 +75,7 @@ public class OpenInterfaceGrpcServer { .addService(new OpenInterfaceGrpcImpl()) .build() .start(); - logger.info("Server started, listening on " + port); + logger.info("Server started, listening on {}", port); try { OnapCommandRegistrar.getRegistrar().setHost(host); @@ -140,7 +140,7 @@ public class OpenInterfaceGrpcServer { @Override public void invoke(Input req, StreamObserver responseObserver) { Output output = null; - logger.info(req.toString()); + logger.info("{}", req); String product = req.getOptionsMap().get(OnapCommandConstants.RPC_PRODUCT); String format = req.getOptionsMap().getOrDefault(OnapCommandConstants.DEFAULT_PARAMETER_OUTPUT_FORMAT, OnapCommandResultType.JSON.name().toLowerCase()); @@ -252,7 +252,7 @@ public class OpenInterfaceGrpcServer { } output = reply.build(); - logger.info(output.toString()); + logger.info("{}", output); } else { //Rpc command will set the output. output = (Output) cmd.getResult().getOutput(); @@ -284,7 +284,7 @@ public class OpenInterfaceGrpcServer { @Override public void remoteCli(Args req, StreamObserver responseObserver) { - logger.info(req.toString()); + logger.info("{}", req); List args = new ArrayList<>(); if (req.getRequestId() != null) { -- cgit 1.2.3-korg