pankaj | 366ce8b | 2014-10-07 17:18:37 -0700 | [diff] [blame] | 1 | package org.onlab.onos.foo; |
| 2 | |
| 3 | import org.onlab.netty.Message; |
| 4 | import org.onlab.netty.MessageHandler; |
| 5 | import org.slf4j.Logger; |
| 6 | import org.slf4j.LoggerFactory; |
| 7 | |
| 8 | /** |
| 9 | * A MessageHandler that simply logs the information. |
| 10 | */ |
| 11 | public class NettyLoggingHandler implements MessageHandler { |
| 12 | |
| 13 | private final Logger log = LoggerFactory.getLogger(getClass()); |
| 14 | |
| 15 | @Override |
| 16 | public void handle(Message message) { |
pankaj | b847eae | 2014-10-08 14:39:25 -0700 | [diff] [blame] | 17 | //log.info("Received message. Payload has {} bytes", message.payload().length); |
pankaj | 366ce8b | 2014-10-07 17:18:37 -0700 | [diff] [blame] | 18 | } |
| 19 | } |