MessageEncoder: lower IOException log level
Change-Id: I7c6eaae3fdb5f87a095722f5b8ed005b460f90cc
Showing
1 changed file
with
6 additions
and
1 deletions
... | @@ -15,6 +15,7 @@ | ... | @@ -15,6 +15,7 @@ |
15 | */ | 15 | */ |
16 | package org.onlab.netty; | 16 | package org.onlab.netty; |
17 | 17 | ||
18 | +import java.io.IOException; | ||
18 | import java.nio.charset.StandardCharsets; | 19 | import java.nio.charset.StandardCharsets; |
19 | 20 | ||
20 | import org.slf4j.Logger; | 21 | import org.slf4j.Logger; |
... | @@ -67,7 +68,11 @@ public class MessageEncoder extends MessageToByteEncoder<InternalMessage> { | ... | @@ -67,7 +68,11 @@ public class MessageEncoder extends MessageToByteEncoder<InternalMessage> { |
67 | 68 | ||
68 | @Override | 69 | @Override |
69 | public void exceptionCaught(ChannelHandlerContext context, Throwable cause) { | 70 | public void exceptionCaught(ChannelHandlerContext context, Throwable cause) { |
70 | - log.error("Exception inside channel handling pipeline.", cause); | 71 | + if (cause instanceof IOException) { |
72 | + log.debug("IOException inside channel handling pipeline.", cause); | ||
73 | + } else { | ||
74 | + log.error("non-IOException inside channel handling pipeline.", cause); | ||
75 | + } | ||
71 | context.close(); | 76 | context.close(); |
72 | } | 77 | } |
73 | } | 78 | } | ... | ... |
-
Please register or login to post a comment