APISonar


io.netty.util.internal.logging.InternalLogger.log

> io > netty > util > internal > logging > InternalLogger > log
io APIs netty APIs util APIs internal APIs logging APIs InternalLogger APIs log APIs

Example 1
private final InternalLogger logger;

    public void queryFailed(Throwable cause) {
        if (dnsServerAddress != null) {
            logger.log(level, "from {} : {} failure", dnsServerAddress, question, cause);
        } else {
            logger.log(level, "{} query never written and failed", question, cause);
        }
    }
Example 2
protected final InternalLogger logger;

    private void log(SpdyFrame msg, Direction d) {
        if (logger.isEnabled(level)) {
            StringBuilder b = new StringBuilder(200)
                .append("\n----------------")
                .append(d.name())
                .append("--------------------\n")
                .append(msg)
                .append("\n------------------------------------");

            logger.log(level, b.toString());
        }
    }
Example 3
protected final InternalLogger logger;

    public void exceptionCaught(ChannelHandlerContext ctx,
            Throwable cause) throws Exception {
        if (logger.isEnabled(internalLevel)) {
            logger.log(internalLevel, format(ctx, "EXCEPTION", cause), cause);
        }
        ctx.fireExceptionCaught(cause);
    }
Example 4
private static final InternalLogger LOG = InternalLoggerFactory.getInstance(Http2FrameCodec.class);

    private void onHttp2UnknownStreamError(@SuppressWarnings("unused") ChannelHandlerContext ctx, Throwable cause,
                                   Http2Exception.StreamException streamException) {
        // It is normal to hit a race condition where we still receive frames for a stream that this
        // peer has deemed closed, such as if this peer sends a RST(CANCEL) to discard the request.
        // Since this is likely to be normal we log at DEBUG level.
        InternalLogLevel level =
            streamException.error() == Http2Error.STREAM_CLOSED ? InternalLogLevel.DEBUG : InternalLogLevel.WARN;
        LOG.log(level, "Stream exception thrown for unknown stream {}.", streamException.streamId(), cause);
    }
Example 5
protected final InternalLogger logger;

    public void deregister(ChannelHandlerContext ctx,
             ChannelPromise promise) throws Exception {
        if (logger.isEnabled(internalLevel)) {
            logger.log(internalLevel, format(ctx, "DEREGISTER"));
        }
        super.deregister(ctx, promise);
    }
Example 6
private final InternalLogger logger;

    public void queryCancelled(int queriesRemaining) {
        if (dnsServerAddress != null) {
            logger.log(level, "from {} : {} cancelled with {} queries remaining", dnsServerAddress, question,
                        queriesRemaining);
        } else {
            logger.log(level, "{} query never written and cancelled with {} queries remaining", question,
                        queriesRemaining);
        }
    }
Example 7
private final InternalLogger logger;

    public DnsQueryLifecycleObserver queryCNAMEd(DnsQuestion cnameQuestion) {
        logger.log(level, "from {} : {} CNAME question {}", dnsServerAddress, question, cnameQuestion);
        return this;
    }
Example 8
private final InternalLogger logger;

    public void logPingAck(Direction direction, ChannelHandlerContext ctx, long data) {
        if (isEnabled()) {
            logger.log(level, "{} {} PING: ack=true bytes={}", ctx.channel(),
                    direction.name(), data);
        }
    }
Example 9
private final InternalLogger logger;

    public void logWindowsUpdate(Direction direction, ChannelHandlerContext ctx, int streamId,
            int windowSizeIncrement) {
        if (isEnabled()) {
            logger.log(level, "{} {} WINDOW_UPDATE: streamId={} windowSizeIncrement={}", ctx.channel(),
                    direction.name(), streamId, windowSizeIncrement);
        }
    }
Example 10
private final InternalLogger logger;

    public void logSettings(Direction direction, ChannelHandlerContext ctx, Http2Settings settings) {
        if (isEnabled()) {
            logger.log(level, "{} {} SETTINGS: ack=false settings={}", ctx.channel(), direction.name(), settings);
        }
    }
Example 11
private final InternalLogger logger;

    public void logPriority(Direction direction, ChannelHandlerContext ctx, int streamId, int streamDependency,
            short weight, boolean exclusive) {
        if (isEnabled()) {
            logger.log(level, "{} {} PRIORITY: streamId={} streamDependency={} weight={} exclusive={}", ctx.channel(),
                    direction.name(), streamId, streamDependency, weight, exclusive);
        }
    }
Example 12
private final InternalLogger logger;

    public void logGoAway(Direction direction, ChannelHandlerContext ctx, int lastStreamId, long errorCode,
            ByteBuf debugData) {
        if (isEnabled()) {
            logger.log(level, "{} {} GO_AWAY: lastStreamId={} errorCode={} length={} bytes={}", ctx.channel(),
                    direction.name(), lastStreamId, errorCode, debugData.readableBytes(), toString(debugData));
        }
    }
Example 13
private final InternalLogger logger;

    public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
            int padding, boolean endStream) {
        if (isEnabled()) {
            logger.log(level, "{} {} HEADERS: streamId={} headers={} padding={} endStream={}", ctx.channel(),
                    direction.name(), streamId, headers, padding, endStream);
        }
    }
Example 14
private final InternalLogger logger;

    public void logUnknownFrame(Direction direction, ChannelHandlerContext ctx, byte frameType, int streamId,
            Http2Flags flags, ByteBuf data) {
        if (isEnabled()) {
            logger.log(level, "{} {} UNKNOWN: frameType={} streamId={} flags={} length={} bytes={}", ctx.channel(),
                    direction.name(), frameType & 0xFF, streamId, flags.value(), data.readableBytes(), toString(data));
        }
    }