Skip to content

Commit

Permalink
Merge pull request #11 from protegeproject/fix-10
Browse files Browse the repository at this point in the history
Fixes #10
  • Loading branch information
matthewhorridge authored Dec 10, 2024
2 parents ebcc1c3 + 8dbcda0 commit 283a1c3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private void handleAndReplyToRequest(CommandHandler<Q,R> handler, Channel channe
response.subscribe(r -> {
replyWithSuccessResponse(channel, message, userId, r);
long endtime = System.currentTimeMillis();
logger.info("Request executed " + request.getChannel() + ". Time taken for Execution is : " + (endtime-startTime) +"ms");
logger.info("Request executed {}. Time taken for Execution is : {}ms", request.getChannel(), endtime - startTime);

}, throwable -> {
if (throwable instanceof CommandExecutionException ex) {
Expand All @@ -186,13 +186,12 @@ private void handleAndReplyToRequest(CommandHandler<Q,R> handler, Channel channe
request);
replyWithErrorResponse(message,channel, userId, ex.getStatus());
long endtime = System.currentTimeMillis();
logger.info("Request failed " + request.getChannel() + "with error " + throwable.getMessage() + ". Time taken for Execution is : " + (endtime-startTime) +"ms");
logger.info("Request failed {}with error {}. Time taken for Execution is : {}ms", request.getChannel(), throwable.getMessage(), endtime - startTime);
}
else {
replyWithErrorResponse(message, channel, userId, HttpStatus.INTERNAL_SERVER_ERROR);
long endtime = System.currentTimeMillis();

logger.info("Request failed " + request.getChannel() + "with error " + throwable.getMessage() + ". Time taken for Execution is : " + (endtime-startTime) +"ms");
logger.info("Request failed {}with error {}. Time taken for Execution is : {}ms", request.getChannel(), throwable.getMessage(), endtime - startTime);

}
});
Expand Down

0 comments on commit 283a1c3

Please sign in to comment.