software.amazon.awssdk.utils.Logger.debug()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中software.amazon.awssdk.utils.Logger.debug()方法的一些代码示例,展示了Logger.debug()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()方法的具体详情如下:
包路径:software.amazon.awssdk.utils.Logger
类名称:Logger
方法名:debug

Logger.debug介绍

[英]Checks if debug is enabled and if so logs the supplied message
[中]检查是否启用调试,如果启用,则记录提供的消息

代码示例

代码示例来源:origin: aws/aws-sdk-java-v2

public void buffer(byte read) {
  pos = -1;
  if (byteBuffered >= maxBufferSize) {
    log.debug(() -> "Buffer size " + maxBufferSize
            + " has been exceeded and the input stream "
            + "will not be repeatable. Freeing buffer memory");
    bufferSizeOverflow = true;
  } else {
    bufferArray[byteBuffered++] = read;
  }
}

代码示例来源:origin: software.amazon.awssdk/auth

public void buffer(byte read) {
  pos = -1;
  if (byteBuffered >= maxBufferSize) {
    log.debug(() -> "Buffer size " + maxBufferSize
            + " has been exceeded and the input stream "
            + "will not be repeatable. Freeing buffer memory");
    bufferSizeOverflow = true;
  } else {
    bufferArray[byteBuffered++] = read;
  }
}

代码示例来源:origin: aws/aws-sdk-java-v2

public void buffer(byte[] src, int srcPos, int length) {
  pos = -1;
  if (byteBuffered + length > maxBufferSize) {
    log.debug(() -> "Buffer size " + maxBufferSize
            + " has been exceeded and the input stream "
            + "will not be repeatable. Freeing buffer memory");
    bufferSizeOverflow = true;
  } else {
    System.arraycopy(src, srcPos, bufferArray, byteBuffered, length);
    byteBuffered += length;
  }
}

代码示例来源:origin: software.amazon.awssdk/auth

public void buffer(byte[] src, int srcPos, int length) {
  pos = -1;
  if (byteBuffered + length > maxBufferSize) {
    log.debug(() -> "Buffer size " + maxBufferSize
            + " has been exceeded and the input stream "
            + "will not be repeatable. Freeing buffer memory");
    bufferSizeOverflow = true;
  } else {
    System.arraycopy(src, srcPos, bufferArray, byteBuffered, length);
    byteBuffered += length;
  }
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
  log.debug(() -> "Accepting a client certificate: " + x509Certificates[0].getSubjectDN());
}

代码示例来源:origin: software.amazon.awssdk/sdk-core

/**
 * Create a chain that will execute the provided interceptors in the order they are provided.
 */
public ExecutionInterceptorChain(List<ExecutionInterceptor> interceptors) {
  this.interceptors = new ArrayList<>(Validate.paramNotNull(interceptors, "interceptors"));
  LOG.debug(() -> "Creating an interceptor chain that will apply interceptors in the following order: " + interceptors);
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
  public void shutdownOutput() throws IOException {
    log.debug(() -> "shutting down output of " + endpoint());
    sock.shutdownOutput();
  }
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void connect(SocketAddress endpoint) throws IOException {
  log.trace(() -> "connecting to: " + endpoint);
  sock.connect(endpoint);
  log.debug(() -> "connected to: " + endpoint);
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void connect(SocketAddress endpoint, int timeout) throws IOException {
  log.trace(() -> "connecting to: " + endpoint);
  sock.connect(endpoint, timeout);
  log.debug(() -> "connected to: " + endpoint);
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public int read() throws IOException {
  byte[] tmp = new byte[1];
  int count = read(tmp, 0, 1);
  if (count != -1) {
    log.debug(() -> "One byte read from the stream.");
    int unsignedByte = (int) tmp[0] & 0xFF;
    return unsignedByte;
  } else {
    return count;
  }
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void close() throws IOException {
  log.debug(() -> "closing " + endpoint());
  sock.close();
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void shutdownInput() throws IOException {
  log.debug(() -> "shutting down input of " + endpoint());
  sock.shutdownInput();
}

代码示例来源:origin: software.amazon.awssdk/auth

@Override
public int read() throws IOException {
  byte[] tmp = new byte[1];
  int count = read(tmp, 0, 1);
  if (count != -1) {
    log.debug(() -> "One byte read from the stream.");
    int unsignedByte = (int) tmp[0] & 0xFF;
    return unsignedByte;
  } else {
    return count;
  }
}

代码示例来源:origin: software.amazon.awssdk/netty-nio-client

@Override
  protected void channelIdle(ChannelHandlerContext ctx, IdleStateEvent event) {
    assert ctx.channel().eventLoop().inEventLoop();

    boolean channelNotInUse = Boolean.FALSE.equals(ctx.channel().attr(ChannelAttributeKey.IN_USE).get());

    if (channelNotInUse && ctx.channel().isOpen()) {
      log.debug(() -> "Closing unused connection (" + ctx.channel().id() + ") because it has been idle for longer than " +
              maxIdleTimeMillis + " milliseconds.");
      ctx.close();
    }
  }
}

代码示例来源:origin: software.amazon.awssdk/netty-nio-client

@Override
public Future<Void> release(Channel channel, Promise<Void> promise) {
  doInEventLoop(channel.eventLoop(), () -> {
    boolean shouldCloseOnRelease = Boolean.TRUE.equals(channel.attr(ChannelAttributeKey.CLOSE_ON_RELEASE).get());
    if (shouldCloseOnRelease && channel.isOpen() && !channel.eventLoop().isShuttingDown()) {
      log.debug(() -> "Closing connection (" + channel.id() + "), instead of releasing it.");
      channel.close();
    }
    delegatePool.release(channel, promise);
  });
  return promise;
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void connect(SocketAddress endpoint) throws IOException {
  log.trace(() -> "connecting to: " + endpoint);
  sock.connect(endpoint);
  log.debug(() -> "connected to: " + endpoint);
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void connect(SocketAddress endpoint, int timeout) throws IOException {
  log.trace(() -> "connecting to: " + endpoint);
  sock.connect(endpoint, timeout);
  log.debug(() -> "connected to: " + endpoint);
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void close() throws IOException {
  log.debug(() -> "closing " + endpoint());
  sock.close();
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
public void shutdownInput() throws IOException {
  log.debug(() -> "shutting down input of " + endpoint());
  sock.shutdownInput();
}

代码示例来源:origin: aws/aws-sdk-java-v2

@Override
  public void shutdownOutput() throws IOException {
    log.debug(() -> "shutting down output of " + endpoint());
    sock.shutdownOutput();
  }
}

相关文章

微信公众号

最新文章

更多