com.proofpoint.log.Logger.debug()方法的使用及代码示例

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

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

Logger.debug介绍

[英]Logs a message at DEBUG level.

Usage example:

logger.debug("value is %s (%d ms)", value, time);

If the format string is invalid or the arguments are insufficient, an error will be logged and execution will continue.
[中]在调试级别记录消息。
用法示例:

logger.debug("value is %s (%d ms)", value, time);

如果格式字符串无效或参数不足,将记录错误并继续执行。

代码示例

代码示例来源:origin: com.proofpoint.platform/bootstrap

private void startInstance(Object obj, Collection<Method> methods)
      throws IllegalAccessException, InvocationTargetException
  {
    log.debug("Starting %s", obj.getClass().getName());
    for (Method method : methods) {
      log.debug("\t%s()", method.getName());
      method.invoke(obj);
    }
  }
}

代码示例来源:origin: com.proofpoint.platform/event

@Override
public Void handleException(Request request, Exception exception)
    throws Exception
{
  log.debug(exception, "Posting event to %s failed", request.getUri());
  throw exception;
}

代码示例来源:origin: com.proofpoint.platform/bootstrap

private void stopList(Queue<Object> instances, Class<? extends Annotation> annotation)
{
  List<Object> reversedInstances = Lists.newArrayList(instances);
  Collections.reverse(reversedInstances);
  for (Object obj : reversedInstances) {
    log.debug("Stopping %s", obj.getClass().getName());
    LifeCycleMethods methods = methodsMap.get(obj.getClass());
    for (Method preDestroy : methods.methodsFor(annotation)) {
      log.debug("\t%s()", preDestroy.getName());
      try {
        preDestroy.invoke(obj);
      }
      catch (Exception e) {
        log.error(e, "Stopping %s.%s() failed:", obj.getClass().getName(), preDestroy.getName());
      }
    }
  }
}

代码示例来源:origin: com.proofpoint.platform/http-client-experimental

@Override
  public AsyncHttpClient get()
  {
    HttpClientConfig config = injector.getInstance(Key.get(HttpClientConfig.class, annotation));
    NettyAsyncHttpClientConfig asyncConfig = injector.getInstance(Key.get(NettyAsyncHttpClientConfig.class, annotation));
    Set<HttpRequestFilter> filters = injector.getInstance(filterKey(annotation));
    NettyIoPool ioPool;
    if (injector.getExistingBinding(Key.get(NettyIoPool.class, annotation)) != null) {
      ioPool = injector.getInstance(Key.get(NettyIoPool.class, annotation));
      log.debug("HttpClient %s uses private IO thread pool", name);
    }
    else {
      log.debug("HttpClient %s uses shared IO thread pool", name);
      ioPool = injector.getInstance(NettyIoPool.class);
    }
    NettyAsyncHttpClient client = new NettyAsyncHttpClient(name, ioPool, config, asyncConfig, filters);
    clients.add(client);
    return client;
  }
}

代码示例来源:origin: com.proofpoint.platform/event-experimental

@Override
public EventSubmissionFailedException handleException(Request request, Exception exception)
{
  log.debug("Posting event to %s failed", request.getUri());
  return new EventSubmissionFailedException(type, pool, ImmutableMap.of(request.getUri(), exception));
}

代码示例来源:origin: com.proofpoint.platform/event-experimental

@Override
  public Void handle(Request request, Response response)
  {
    int statusCode = response.getStatusCode();
    if (statusCode >= 200 && statusCode <= 299) {
      return null;
    }
    try {
      InputStream inputStream = response.getInputStream();
      String responseBody = CharStreams.toString(new InputStreamReader(inputStream));
      log.debug("Posting event to %s failed: status_code=%d status_line=%s body=%s", request.getUri(), statusCode, response.getStatusMessage(), responseBody);
    }
    catch (IOException bodyError) {
      log.debug("Posting event to %s failed: status_code=%d status_line=%s error=%s",
          request.getUri(),
          statusCode,
          response.getStatusMessage(),
          bodyError.getMessage());
    }
    return null;
  }
}

代码示例来源:origin: com.proofpoint.platform/event

@Override
  public Void handle(Request request, Response response)
  {
    int statusCode = response.getStatusCode();
    if (statusCode >= 200 && statusCode <= 299) {
      return null;
    }
    try {
      InputStream inputStream = response.getInputStream();
      String responseBody = CharStreams.toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
      log.debug("Posting event to %s failed: status_code=%d status_line=%s body=%s", request.getUri(), statusCode, response.getStatusMessage(), responseBody);
    }
    catch (IOException bodyError) {
      log.debug("Posting event to %s failed: status_code=%d status_line=%s error=%s",
          request.getUri(),
          statusCode,
          response.getStatusMessage(),
          bodyError.getMessage());
    }
    throw new UnexpectedResponseException(format("Posting event to %s failed", request.getUri()), request, response);
  }
}

代码示例来源:origin: com.proofpoint.galaxy/galaxy-coordinator

log.debug("launching instances: %s", request);
RunInstancesResult result = null;
AmazonClientException exception = null;
  throw exception;
log.debug("launched instances: %s", result);

代码示例来源:origin: com.proofpoint.galaxy/galaxy-coordinator

@Override
public void setServiceInventory(List<ServiceDescriptor> serviceInventory)
{
  if (agentStatus.getState() == ONLINE) {
    Preconditions.checkNotNull(serviceInventory, "serviceInventory is null");
    URI internalUri = agentStatus.getInternalUri();
    try {
      Request request = RequestBuilder.preparePut()
          .setUri(uriBuilderFrom(internalUri).appendPath("/v1/serviceInventory").build())
          .setHeader(CONTENT_TYPE, APPLICATION_JSON)
          .setBodyGenerator(jsonBodyGenerator(serviceDescriptorsCodec, new ServiceDescriptorsRepresentation(environment, serviceInventory)))
          .build();
      httpClient.execute(request, createStatusResponseHandler());
      if (serviceInventoryUp.compareAndSet(false, true)) {
        log.info("Service inventory put succeeded for agent at %s", internalUri);
      }
    }
    catch (Exception e) {
      if (serviceInventoryUp.compareAndSet(true, false) && !log.isDebugEnabled()) {
        log.error("Unable to post service inventory to agent at %s: %s", internalUri, e.getMessage());
      }
      log.debug(e, "Unable to post service inventory to agent at %s: %s", internalUri, e.getMessage());
    }
  }
}

代码示例来源:origin: com.proofpoint.galaxy/galaxy-coordinator

.withMaxCount(agentCount);
log.debug("launching instances: %s", request);
RunInstancesResult result = ec2Client.runInstances(request);
log.debug("launched instances: %s", result);

代码示例来源:origin: com.proofpoint.platform/cassandra-experimental

log.debug("opening keyspace " + table);
Table.open(table);

相关文章