本文整理了Java中org.jclouds.logging.Logger.trace()
方法的一些代码示例,展示了Logger.trace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.trace()
方法的具体详情如下:
包路径:org.jclouds.logging.Logger
类名称:Logger
方法名:trace
暂无
代码示例来源:origin: jclouds/legacy-jclouds
/**
* {@inheritDoc}
*/
@Override
public Set<ComputeMetadata> listNodes() {
logger.trace(">> listing nodes");
Set<ComputeMetadata> set = newLinkedHashSet(listNodesStrategy.listNodes());
logger.trace("<< list(%d)", set.size());
return set;
}
代码示例来源:origin: jclouds/legacy-jclouds
/**
* {@inheritDoc}
*/
@Override
public Set<? extends NodeMetadata> listNodesDetailsMatching(Predicate<ComputeMetadata> filter) {
checkNotNull(filter, "filter");
logger.trace(">> listing node details matching(%s)", filter);
Set<NodeMetadata> set = newLinkedHashSet(listNodesStrategy.listDetailsOnNodesMatching(filter));
logger.trace("<< list(%d)", set.size());
return set;
}
代码示例来源:origin: jclouds/legacy-jclouds
private Function<HttpResponse, ?> getTransformer(String commandName, HttpCommand command) {
HttpRequest request = command.getCurrentRequest();
Function<HttpResponse, ?> transformer = transformerForRequest.apply(request);
logger.trace("<< response from %s is parsed by %s", commandName, transformer.getClass().getSimpleName());
return transformer;
}
代码示例来源:origin: jclouds/legacy-jclouds
@Subscribe
public void handleDeadEvent(DeadEvent deadEvent) { // NO_UCD
logger.trace("detected dead event %s", deadEvent.getEvent());
}
}
代码示例来源:origin: jclouds/legacy-jclouds
private HttpCommand toCommand(String commandName, Invocation invocation) {
logger.trace(">> converting %s", commandName);
HttpRequest request = annotationProcessor.apply(invocation);
logger.trace("<< converted %s to %s", commandName, request.getRequestLine());
return new HttpCommand(request);
}
代码示例来源:origin: jclouds/legacy-jclouds
private HttpCommand toCommand(String commandName, Invocation invocation) {
logger.trace(">> converting %s", commandName);
HttpRequest request = annotationProcessor.apply(invocation);
logger.trace("<< converted %s to %s", commandName, request.getRequestLine());
return new HttpCommand(request);
}
代码示例来源:origin: org.jclouds/jclouds-core
private Function<HttpResponse, ?> getTransformer(String commandName, HttpCommand command) {
HttpRequest request = command.getCurrentRequest();
Function<HttpResponse, ?> transformer = transformerForRequest.apply(request);
logger.trace("<< response from %s is parsed by %s", commandName, transformer.getClass().getSimpleName());
return transformer;
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
private HttpCommand toCommand(String commandName, Invocation invocation) {
logger.trace(">> converting %s", commandName);
HttpRequest request = annotationProcessor.apply(invocation);
logger.trace("<< converted %s to %s", commandName, request.getRequestLine());
return new HttpCommand(request);
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(DriveInfo drive) {
logger.trace("looking for claims on drive %s", checkNotNull(drive, "drive"));
drive = refresh(drive);
if (drive == null)
return false;
logger.trace("%s: looking for drive claims: currently: %s", drive.getUuid(), drive.getClaimed());
return drive.getClaimed().size() > 0;
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(VirtualMachine virtualMachine) {
logger.trace("looking for state on virtualMachine %s", checkNotNull(virtualMachine, "virtualMachine"));
virtualMachine = refresh(virtualMachine);
if (virtualMachine == null)
return true;
logger.trace("%s: looking for virtualMachine state %s: currently: %s", virtualMachine.getId(), State.DESTROYED,
virtualMachine.getState());
return virtualMachine.getState() == State.DESTROYED;
}
代码示例来源:origin: jclouds/legacy-jclouds
private org.jclouds.Fallback<?> getFallback(String commandName, Invocation invocation, HttpCommand command) {
HttpRequest request = command.getCurrentRequest();
org.jclouds.Fallback<?> fallback = config.getFallback(invocation);
if (fallback instanceof InvocationContext)
InvocationContext.class.cast(fallback).setContext(request);
logger.trace("<< exceptions from %s are parsed by %s", commandName, fallback.getClass().getSimpleName());
return fallback;
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(Server server) {
logger.trace("looking for state on server %s", checkNotNull(server, "server"));
server = refresh(server);
if (server == null)
return true;
logger.trace("%s: looking for server state %s: currently: %s", server.getId(),
ServerStatus.DELETED, server.getStatus());
return server.getStatus() == ServerStatus.DELETED;
}
代码示例来源:origin: jclouds/legacy-jclouds
private org.jclouds.Fallback<?> getFallback(String commandName, Invocation invocation, HttpCommand command) {
HttpRequest request = command.getCurrentRequest();
org.jclouds.Fallback<?> fallback = config.getFallback(invocation);
if (fallback instanceof InvocationContext)
InvocationContext.class.cast(fallback).setContext(request);
logger.trace("<< exceptions from %s are parsed by %s", commandName, fallback.getClass().getSimpleName());
return fallback;
}
代码示例来源:origin: org.jclouds/jclouds-core
private org.jclouds.Fallback<?> getFallback(String commandName, Invocation invocation, HttpCommand command) {
HttpRequest request = command.getCurrentRequest();
org.jclouds.Fallback<?> fallback = config.getFallback(invocation);
if (fallback instanceof InvocationContext)
InvocationContext.class.cast(fallback).setContext(request);
logger.trace("<< exceptions from %s are parsed by %s", commandName, fallback.getClass().getSimpleName());
return fallback;
}
代码示例来源:origin: jclouds/legacy-jclouds
public void awaitCompletion(Iterable<String> jobs) {
logger.debug(">> awaiting completion of jobs(%s)", jobs);
for (String job : jobs)
awaitCompletion(job);
logger.trace("<< completed jobs(%s)", jobs);
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(URI taskId) {
logger.trace("looking for status on task %s", taskId);
Task task = client.getTask(taskId);
// perhaps task isn't available, yet
if (task == null)
return false;
logger.trace("%s: looking for status %s: currently: %s", task, TaskStatus.SUCCESS, task.getStatus());
if (task.getStatus() == TaskStatus.ERROR)
throw new RuntimeException("error on task: " + task.getHref() + " error: " + task.getError());
return task.getStatus() == TaskStatus.SUCCESS;
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(Volume volume) {
logger.trace("looking for status on volume %s", volume.getId());
volume = Iterables.getOnlyElement(client.describeVolumesInRegion(volume.getRegion(), volume
.getId()));
logger.trace("%s: looking for status %s: currently: %s", volume, Volume.Status.AVAILABLE,
volume.getStatus());
return volume.getStatus() == Volume.Status.AVAILABLE;
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(RegionAndName securityGroup) {
logger.trace("looking for security group %s/%s", securityGroup.getRegion(), securityGroup.getName());
try {
return refresh(securityGroup) != null;
} catch (ResourceNotFoundException e) {
return false;
} catch (NoSuchElementException e) {
return false;
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public boolean apply(RunningInstance instance) {
logger.trace("looking for ipAddress on instance %s", instance);
try {
instance = refresh(instance);
return instance.getIpAddress() != null;
} catch (AWSResponseException e) {
if (e.getError().getCode().equals("InvalidInstanceID.NotFound"))
return false;
throw e;
}
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
public boolean apply(CommandUsingClient commandUsingClient) {
logger.trace("looking for [%s] state on %s@%s", commandUsingClient.command, commandUsingClient.client
.getUsername(), commandUsingClient.client.getHostAddress());
ExecResponse response = refresh(commandUsingClient);
while (response.getExitStatus() == -1)
response = refresh(commandUsingClient);
logger.trace("%s@%s: looking for exit code 0: currently: %s", commandUsingClient.client.getUsername(),
commandUsingClient.client.getHostAddress(), response.getExitStatus());
return 0 == response.getExitStatus();
}
内容来源于网络,如有侵权,请联系作者删除!