Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0004712: Logging panel push pull requests
  • Loading branch information
erilong committed Dec 22, 2020
1 parent 410e924 commit 9ad151b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Expand Up @@ -83,8 +83,7 @@ public void handleWithCompression(HttpServletRequest req, HttpServletResponse re
ServletException {
// request has the "other" nodes info
String nodeId = ServletUtils.getParameter(req, WebConstants.NODE_ID);

log.debug("Pull request received from {}", nodeId);
log.debug("Pull requested from node {} at remote address {}", nodeId, req.getRemoteAddr());

if (StringUtils.isBlank(nodeId)) {
ServletUtils.sendError(res, HttpServletResponse.SC_BAD_REQUEST, "Node must be specified");
Expand All @@ -99,8 +98,7 @@ public void handleWithCompression(HttpServletRequest req, HttpServletResponse re
// pull out headers and pass to pull() method
handlePull(nodeId, req.getRemoteHost(), req.getRemoteAddr(), res.getOutputStream(), req.getHeader(WebConstants.HEADER_ACCEPT_CHARSET), res, map);

log.debug("Done with Pull request from {}", nodeId);

log.debug("Pull completed for {} at remote address {}", nodeId, req.getRemoteAddr());
}

protected void handlePull(String nodeId, String remoteHost, String remoteAddress,
Expand Down
Expand Up @@ -59,9 +59,7 @@ public void handle(HttpServletRequest req, HttpServletResponse res) throws IOExc
ServletException {

String nodeId = ServletUtils.getParameter(req, WebConstants.NODE_ID);
if (log.isDebugEnabled()) {
log.debug("Push requested from node {} at remote address {}", nodeId, req.getRemoteAddr());
}
log.debug("Push requested from node {} at remote address {}", nodeId, req.getRemoteAddr());

InputStream inputStream = createInputStream(req);
OutputStream outputStream = res.getOutputStream();
Expand All @@ -75,7 +73,7 @@ public void handle(HttpServletRequest req, HttpServletResponse res) throws IOExc
}

res.flushBuffer();
log.debug("Push completed for {}", nodeId);
log.debug("Push completed for {} at remote address", nodeId, req.getRemoteAddr());
}

protected int push(String sourceNodeId, String channelId, InputStream inputStream, OutputStream outputStream) throws IOException {
Expand Down

0 comments on commit 9ad151b

Please sign in to comment.