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);