You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/08/22 07:50:36 UTC

[flink] branch master updated: [hotfix] [REST] Add logging to RouterHandler

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 09eb13a  [hotfix] [REST] Add logging to RouterHandler
09eb13a is described below

commit 09eb13a80ba8f7f59b92c4d026ae819c7fb64c42
Author: zentol <ch...@apache.org>
AuthorDate: Wed Aug 30 12:20:08 2017 +0200

    [hotfix] [REST] Add logging to RouterHandler
---
 .../org/apache/flink/runtime/rest/handler/router/RouterHandler.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/RouterHandler.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/RouterHandler.java
index cdfd169..672442f 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/RouterHandler.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/router/RouterHandler.java
@@ -35,6 +35,9 @@ import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseSt
 import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpVersion;
 import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.QueryStringDecoder;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.util.Map;
 
 import static java.util.Objects.requireNonNull;
@@ -52,6 +55,8 @@ public class RouterHandler extends SimpleChannelInboundHandler<HttpRequest> {
 	private static final String ROUTER_HANDLER_NAME = RouterHandler.class.getName() + "_ROUTER_HANDLER";
 	private static final String ROUTED_HANDLER_NAME = RouterHandler.class.getName() + "_ROUTED_HANDLER";
 
+	private static final Logger LOG = LoggerFactory.getLogger(RouterHandler.class);
+
 	private final Map<String, String> responseHeaders;
 	private final Router router;
 
@@ -106,6 +111,7 @@ public class RouterHandler extends SimpleChannelInboundHandler<HttpRequest> {
 	}
 
 	private void respondNotFound(ChannelHandlerContext channelHandlerContext, HttpRequest request) {
+		LOG.trace("Request could not be routed to any handler. Uri:{} Method:{}", request.getUri(), request.getMethod());
 		HandlerUtils.sendErrorResponse(
 			channelHandlerContext,
 			request,