From 396ab8c3ff827d9786452ada110dfdc3251f361e Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 29 Mar 2018 17:59:17 +0900 Subject: [PATCH] ing --- src/main/java/com/loafle/overflow/proxy/ServiceProxy.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java b/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java index d7fbb22..2a10499 100644 --- a/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java +++ b/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java @@ -76,15 +76,19 @@ public class ServiceProxy { responseObserver.onNext(reply); responseObserver.onCompleted(); } catch (OverflowException e) { - logger.warning(e.toString()); + logger.warning(getExceptionMessage(request, e)); responseObserver.onError(convertException(e)); } catch (OverflowRuntimeException e) { - logger.warning(e.toString()); + logger.warning(getExceptionMessage(request, e)); responseObserver.onError(convertException(e)); } } + private String getExceptionMessage(ServerInput request, Exception e) { + return String.format("Target: %s, Method:%s, Params:%s, ex:%s", request.getTarget(), request.getMethod(), request.getParamsList().asByteStringList(), e.toString()); + } + protected StatusRuntimeException convertException(OverflowRuntimeException e) { String message = String.format("%s|%s", e.getClass().getSimpleName(), e.getMessage()); Status status = Status.fromCode(Status.Code.INTERNAL).withDescription(message);