Example usage for io.netty.handler.logging LogLevel ERROR

List of usage examples for io.netty.handler.logging LogLevel ERROR

Introduction

In this page you can find the example usage for io.netty.handler.logging LogLevel ERROR.

Prototype

LogLevel ERROR

To view the source code for io.netty.handler.logging LogLevel ERROR.

Click Source Link

Usage

From source file:org.kobeyoung81.dummyhttpproxy.HexDumpProxyInitializer.java

License:Apache License

@Override
public void initChannel(SocketChannel ch) {
    if ("local".equals(role)) {
        ch.pipeline().addLast(new LoggingHandler(LogLevel.ERROR),
                new HexDumpProxyFrontendHandler(role, remoteHost, remotePort));
    } else {//  w w w.j  a v  a  2s .  c om
        ch.pipeline().addLast(new LoggingHandler(LogLevel.ERROR), new DummyHttpRequestDecoder(),
                new SnappyFramedDecoder(), new HexDumpProxyFrontendHandler(role, remoteHost, remotePort),
                new SnappyFramedEncoder(), new DummyHttpResponseEncoder());
    }
}