Examples of LoggingHandler


Examples of com.sonatype.maven.shell.nexus.internal.wink.LoggingHandler

        HttpClient httpClient = new DefaultHttpClient();
        ClientConfig config = new ApacheHttpClientConfig(httpClient);
        config.followRedirects(true);

        config.handlers(
            new LoggingHandler(log, /*debug*/ false),
            new BasicAuthSecurityHandler(username, password)
        );

        this.client = new RestClient(config);
    }
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

        server = new ServerBootstrap();
        server.group(bossGroup, workerGroup)
              .channel(NioServerSocketChannel.class)
              .option(ChannelOption.SO_BACKLOG, 100)
              .handler(new LoggingHandler(LogLevel.INFO))
              .childHandler(new BasicSSLServerInitializer(sslCtx));

        server.bind(port).sync().channel().closeFuture();
    }
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

    private static final Logger logger = LoggerFactory.getLogger(HttpChannelizer.class);

    @Override
    public void configure(final ChannelPipeline pipeline) {
        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-io", LogLevel.DEBUG));

        pipeline.addLast("http-server", new HttpServerCodec());

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("http-io", LogLevel.DEBUG));

        pipeline.addLast(new HttpObjectAggregator(1048576));
        pipeline.addLast(gremlinGroup, "http-gremlin-handler", new HttpGremlinEndpointHandler(serializers, gremlinExecutor));
    }
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

        .option(ChannelOption.SO_BACKLOG, 100) //
        .option(ChannelOption.SO_RCVBUF, 1 << 17) //
        .option(ChannelOption.SO_SNDBUF, 1 << 17) //
        .group(eventLoopGroup) //
        .childOption(ChannelOption.ALLOCATOR, alloc) //
        .handler(new LoggingHandler(LogLevel.INFO)) //
        .childHandler(new ChannelInitializer<SocketChannel>() {
          @Override
          protected void initChannel(SocketChannel ch) throws Exception {
           
            C connection = initRemoteConnection(ch);
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

    private static final Logger logger = LoggerFactory.getLogger(WebSocketChannelizer.class);

    @Override
    public void configure(final ChannelPipeline pipeline) {
        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-io", LogLevel.DEBUG));

        logger.debug("HttpRequestDecoder settings - maxInitialLineLength={}, maxHeaderSize={}, maxChunkSize={}",
                settings.maxInitialLineLength, settings.maxHeaderSize, settings.maxChunkSize);
        pipeline.addLast("http-request-decoder", new HttpRequestDecoder(settings.maxInitialLineLength, settings.maxHeaderSize, settings.maxChunkSize));

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-decoder-aggregator", LogLevel.DEBUG));

        logger.debug("HttpObjectAggregator settings - maxContentLength={}, maxAccumulationBufferComponents={}",
                settings.maxContentLength, settings.maxAccumulationBufferComponents);
        final HttpObjectAggregator aggregator = new HttpObjectAggregator(settings.maxContentLength);
        aggregator.setMaxCumulationBufferComponents(settings.maxAccumulationBufferComponents);
        pipeline.addLast("aggregator", aggregator);

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-aggregator-encoder", LogLevel.DEBUG));

        pipeline.addLast("http-response-encoder", new HttpResponseEncoder());
        pipeline.addLast("request-handler", new WebSocketServerProtocolHandler("/gremlin", null, false, settings.maxContentLength));

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-aggregator-encoder", LogLevel.DEBUG));

        pipeline.addLast("response-encoder", new WsGremlinResponseEncoder());
        pipeline.addLast("request-text-decoder", new WsGremlinTextRequestDecoder());
        pipeline.addLast("request-binary-decoder", new WsGremlinBinaryRequestDecoder(serializers));

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-aggregator-encoder", LogLevel.DEBUG));
    }
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

    private static final Logger logger = LoggerFactory.getLogger(NioChannelizer.class);

    @Override
    public void configure(final ChannelPipeline pipeline) {
        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-io", LogLevel.DEBUG));

        pipeline.addLast("response-encoder", new NioGremlinResponseEncoder());
        pipeline.addLast("request-binary-decoder", new NioGremlinBinaryRequestDecoder(serializers));

        if (logger.isDebugEnabled())
            pipeline.addLast(new LoggingHandler("log-codec", LogLevel.DEBUG));
    }
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

     */
    public static <I, O> PipelineConfigurator<I, O> wireLoggingConfigurator(final LogLevel wireLogginLevel) {
        return new PipelineConfigurator<I, O>() {
            @Override
            public void configureNewPipeline(ChannelPipeline pipeline) {
                pipeline.addFirst(new LoggingHandler(wireLogginLevel));
            }
        };
    }
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

        ServerBootstrap b = new ServerBootstrap();
        try {
            b.group(new NioEventLoopGroup(), new NioEventLoopGroup())
             .channel(NioServerSocketChannel.class)
             .option(ChannelOption.SO_BACKLOG, 100)
             .handler(new LoggingHandler(LogLevel.INFO))
             .childHandler(new ChannelInitializer<SocketChannel>() {
                 @Override
                 public void initChannel(SocketChannel ch) throws Exception {
                     ch.pipeline().addLast(
                             new StringEncoder(BufType.BYTE, CharsetUtil.UTF_8),
View Full Code Here

Examples of io.netty.handler.logging.LoggingHandler

            sb.group(new LocalEventLoopGroup())
              .channel(LocalServerChannel.class)
              .handler(new ChannelInitializer<LocalServerChannel>() {
                  @Override
                  public void initChannel(LocalServerChannel ch) throws Exception {
                      ch.pipeline().addLast(new LoggingHandler(LogLevel.INFO));
                  }
              })
              .childHandler(new ChannelInitializer<LocalChannel>() {
                  @Override
                  public void initChannel(LocalChannel ch) throws Exception {
                      ch.pipeline().addLast(
                              new LoggingHandler(LogLevel.INFO),
                              new LocalEchoServerHandler());
                  }
              });

            cb.group(new NioEventLoopGroup()) // NIO event loops are also OK
              .channel(LocalChannel.class)
              .handler(new ChannelInitializer<LocalChannel>() {
                  @Override
                  public void initChannel(LocalChannel ch) throws Exception {
                      ch.pipeline().addLast(
                              new LoggingHandler(LogLevel.INFO),
                              new LocalEchoClientHandler());
                  }
              });

            // Start the server.
View Full Code Here

Examples of it.javalinux.wise.core.client.handler.LoggingHandler

    private void addLoggingHandler(final WSEndpoint endpoint)
    {
        if (loggingEnabled)
        {
            logger.debug("adding logging handler");
            endpoint.addHandler(new LoggingHandler());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.