Add more traces when failing

This commit is contained in:
David Pilato 2014-01-28 21:45:23 +01:00
parent fd0354e26f
commit b065179367
1 changed files with 4 additions and 1 deletions

View File

@ -51,12 +51,15 @@ public class GceComputeServiceImpl extends AbstractLifecycleComponent<GceCompute
@Override
public Collection<Instance> instances() {
try {
logger.debug("get instances for project [{}], zone [{}]", project, zone);
Compute.Instances.List list = client().instances().list(project, zone);
InstanceList instanceList = list.execute();
return instanceList.getItems();
} catch (IOException e) {
logger.warn("can not get list of nodes. Disabling GCE discovery.");
logger.warn("disabling GCE discovery. Can not get list of nodes: {}", e.getMessage());
logger.debug("Full exception:", e);
return new ArrayList<Instance>();
}
}