org.jclouds.logging.Logger.trace()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(215)

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

Logger.trace介绍

暂无

代码示例

代码示例来源:origin: jclouds/legacy-jclouds

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Set<ComputeMetadata> listNodes() {
  6. logger.trace(">> listing nodes");
  7. Set<ComputeMetadata> set = newLinkedHashSet(listNodesStrategy.listNodes());
  8. logger.trace("<< list(%d)", set.size());
  9. return set;
  10. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Set<? extends NodeMetadata> listNodesDetailsMatching(Predicate<ComputeMetadata> filter) {
  6. checkNotNull(filter, "filter");
  7. logger.trace(">> listing node details matching(%s)", filter);
  8. Set<NodeMetadata> set = newLinkedHashSet(listNodesStrategy.listDetailsOnNodesMatching(filter));
  9. logger.trace("<< list(%d)", set.size());
  10. return set;
  11. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. private Function<HttpResponse, ?> getTransformer(String commandName, HttpCommand command) {
  2. HttpRequest request = command.getCurrentRequest();
  3. Function<HttpResponse, ?> transformer = transformerForRequest.apply(request);
  4. logger.trace("<< response from %s is parsed by %s", commandName, transformer.getClass().getSimpleName());
  5. return transformer;
  6. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. @Subscribe
  2. public void handleDeadEvent(DeadEvent deadEvent) { // NO_UCD
  3. logger.trace("detected dead event %s", deadEvent.getEvent());
  4. }
  5. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. private HttpCommand toCommand(String commandName, Invocation invocation) {
  2. logger.trace(">> converting %s", commandName);
  3. HttpRequest request = annotationProcessor.apply(invocation);
  4. logger.trace("<< converted %s to %s", commandName, request.getRequestLine());
  5. return new HttpCommand(request);
  6. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. private HttpCommand toCommand(String commandName, Invocation invocation) {
  2. logger.trace(">> converting %s", commandName);
  3. HttpRequest request = annotationProcessor.apply(invocation);
  4. logger.trace("<< converted %s to %s", commandName, request.getRequestLine());
  5. return new HttpCommand(request);
  6. }

代码示例来源:origin: org.jclouds/jclouds-core

  1. private Function<HttpResponse, ?> getTransformer(String commandName, HttpCommand command) {
  2. HttpRequest request = command.getCurrentRequest();
  3. Function<HttpResponse, ?> transformer = transformerForRequest.apply(request);
  4. logger.trace("<< response from %s is parsed by %s", commandName, transformer.getClass().getSimpleName());
  5. return transformer;
  6. }

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core

  1. private HttpCommand toCommand(String commandName, Invocation invocation) {
  2. logger.trace(">> converting %s", commandName);
  3. HttpRequest request = annotationProcessor.apply(invocation);
  4. logger.trace("<< converted %s to %s", commandName, request.getRequestLine());
  5. return new HttpCommand(request);
  6. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(DriveInfo drive) {
  2. logger.trace("looking for claims on drive %s", checkNotNull(drive, "drive"));
  3. drive = refresh(drive);
  4. if (drive == null)
  5. return false;
  6. logger.trace("%s: looking for drive claims: currently: %s", drive.getUuid(), drive.getClaimed());
  7. return drive.getClaimed().size() > 0;
  8. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(VirtualMachine virtualMachine) {
  2. logger.trace("looking for state on virtualMachine %s", checkNotNull(virtualMachine, "virtualMachine"));
  3. virtualMachine = refresh(virtualMachine);
  4. if (virtualMachine == null)
  5. return true;
  6. logger.trace("%s: looking for virtualMachine state %s: currently: %s", virtualMachine.getId(), State.DESTROYED,
  7. virtualMachine.getState());
  8. return virtualMachine.getState() == State.DESTROYED;
  9. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. private org.jclouds.Fallback<?> getFallback(String commandName, Invocation invocation, HttpCommand command) {
  2. HttpRequest request = command.getCurrentRequest();
  3. org.jclouds.Fallback<?> fallback = config.getFallback(invocation);
  4. if (fallback instanceof InvocationContext)
  5. InvocationContext.class.cast(fallback).setContext(request);
  6. logger.trace("<< exceptions from %s are parsed by %s", commandName, fallback.getClass().getSimpleName());
  7. return fallback;
  8. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(Server server) {
  2. logger.trace("looking for state on server %s", checkNotNull(server, "server"));
  3. server = refresh(server);
  4. if (server == null)
  5. return true;
  6. logger.trace("%s: looking for server state %s: currently: %s", server.getId(),
  7. ServerStatus.DELETED, server.getStatus());
  8. return server.getStatus() == ServerStatus.DELETED;
  9. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. private org.jclouds.Fallback<?> getFallback(String commandName, Invocation invocation, HttpCommand command) {
  2. HttpRequest request = command.getCurrentRequest();
  3. org.jclouds.Fallback<?> fallback = config.getFallback(invocation);
  4. if (fallback instanceof InvocationContext)
  5. InvocationContext.class.cast(fallback).setContext(request);
  6. logger.trace("<< exceptions from %s are parsed by %s", commandName, fallback.getClass().getSimpleName());
  7. return fallback;
  8. }

代码示例来源:origin: org.jclouds/jclouds-core

  1. private org.jclouds.Fallback<?> getFallback(String commandName, Invocation invocation, HttpCommand command) {
  2. HttpRequest request = command.getCurrentRequest();
  3. org.jclouds.Fallback<?> fallback = config.getFallback(invocation);
  4. if (fallback instanceof InvocationContext)
  5. InvocationContext.class.cast(fallback).setContext(request);
  6. logger.trace("<< exceptions from %s are parsed by %s", commandName, fallback.getClass().getSimpleName());
  7. return fallback;
  8. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public void awaitCompletion(Iterable<String> jobs) {
  2. logger.debug(">> awaiting completion of jobs(%s)", jobs);
  3. for (String job : jobs)
  4. awaitCompletion(job);
  5. logger.trace("<< completed jobs(%s)", jobs);
  6. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(URI taskId) {
  2. logger.trace("looking for status on task %s", taskId);
  3. Task task = client.getTask(taskId);
  4. // perhaps task isn't available, yet
  5. if (task == null)
  6. return false;
  7. logger.trace("%s: looking for status %s: currently: %s", task, TaskStatus.SUCCESS, task.getStatus());
  8. if (task.getStatus() == TaskStatus.ERROR)
  9. throw new RuntimeException("error on task: " + task.getHref() + " error: " + task.getError());
  10. return task.getStatus() == TaskStatus.SUCCESS;
  11. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(Volume volume) {
  2. logger.trace("looking for status on volume %s", volume.getId());
  3. volume = Iterables.getOnlyElement(client.describeVolumesInRegion(volume.getRegion(), volume
  4. .getId()));
  5. logger.trace("%s: looking for status %s: currently: %s", volume, Volume.Status.AVAILABLE,
  6. volume.getStatus());
  7. return volume.getStatus() == Volume.Status.AVAILABLE;
  8. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(RegionAndName securityGroup) {
  2. logger.trace("looking for security group %s/%s", securityGroup.getRegion(), securityGroup.getName());
  3. try {
  4. return refresh(securityGroup) != null;
  5. } catch (ResourceNotFoundException e) {
  6. return false;
  7. } catch (NoSuchElementException e) {
  8. return false;
  9. }
  10. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. public boolean apply(RunningInstance instance) {
  2. logger.trace("looking for ipAddress on instance %s", instance);
  3. try {
  4. instance = refresh(instance);
  5. return instance.getIpAddress() != null;
  6. } catch (AWSResponseException e) {
  7. if (e.getError().getCode().equals("InvalidInstanceID.NotFound"))
  8. return false;
  9. throw e;
  10. }
  11. }

代码示例来源:origin: jclouds/legacy-jclouds

  1. @Override
  2. public boolean apply(CommandUsingClient commandUsingClient) {
  3. logger.trace("looking for [%s] state on %s@%s", commandUsingClient.command, commandUsingClient.client
  4. .getUsername(), commandUsingClient.client.getHostAddress());
  5. ExecResponse response = refresh(commandUsingClient);
  6. while (response.getExitStatus() == -1)
  7. response = refresh(commandUsingClient);
  8. logger.trace("%s@%s: looking for exit code 0: currently: %s", commandUsingClient.client.getUsername(),
  9. commandUsingClient.client.getHostAddress(), response.getExitStatus());
  10. return 0 == response.getExitStatus();
  11. }

相关文章