Repository: camel Updated Branches: refs/heads/master 8d4be572d -> 6de742bdb
Improvements to AWS-EC2 logging Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6de742bd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6de742bd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6de742bd Branch: refs/heads/master Commit: 6de742bdbae301857baed993517569b25d057dd7 Parents: 8d4be57 Author: Andrea Cosentino <[email protected]> Authored: Wed Jul 1 17:45:57 2015 +0200 Committer: Andrea Cosentino <[email protected]> Committed: Wed Jul 1 17:45:57 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/camel/component/aws/ec2/EC2Producer.java | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/6de742bd/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java ---------------------------------------------------------------------- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java index 5ae28e4..c4cc242 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ec2/EC2Producer.java @@ -16,6 +16,7 @@ */ package org.apache.camel.component.aws.ec2; +import java.util.Arrays; import java.util.Collection; import com.amazonaws.AmazonServiceException; @@ -198,6 +199,7 @@ public class EC2Producer extends DefaultProducer { LOG.trace("Run Instances command returned the error code {}", ase.getErrorCode()); throw ase; } + LOG.trace("Creating and running instances with ami [{}] and instance type {}", ami, instanceType.toString()); Message message = getMessageForResponse(exchange); message.setBody(result); } @@ -218,6 +220,7 @@ public class EC2Producer extends DefaultProducer { LOG.trace("Start Instances command returned the error code {}", ase.getErrorCode()); throw ase; } + LOG.trace("Starting instances with Ids [{}] ", Arrays.toString(instanceIds.toArray())); Message message = getMessageForResponse(exchange); message.setBody(result); } @@ -238,6 +241,7 @@ public class EC2Producer extends DefaultProducer { LOG.trace("Stop Instances command returned the error code {}", ase.getErrorCode()); throw ase; } + LOG.trace("Stopping instances with Ids [{}] ", Arrays.toString(instanceIds.toArray())); Message message = getMessageForResponse(exchange); message.setBody(result); } @@ -258,6 +262,7 @@ public class EC2Producer extends DefaultProducer { LOG.trace("Terminate Instances command returned the error code {}", ase.getErrorCode()); throw ase; } + LOG.trace("Terminating instances with Ids [{}] ", Arrays.toString(instanceIds.toArray())); Message message = getMessageForResponse(exchange); message.setBody(result); } @@ -308,6 +313,7 @@ public class EC2Producer extends DefaultProducer { throw new IllegalArgumentException("Instances Ids must be specified"); } try { + LOG.trace("Rebooting instances with Ids [{}] ", Arrays.toString(instanceIds.toArray())); ec2Client.rebootInstances(request); } catch (AmazonServiceException ase) { LOG.trace("Reboot Instances command returned the error code {}", ase.getErrorCode()); @@ -331,6 +337,7 @@ public class EC2Producer extends DefaultProducer { LOG.trace("Monitor Instances command returned the error code {}", ase.getErrorCode()); throw ase; } + LOG.trace("Start Monitoring instances with Ids [{}] ", Arrays.toString(instanceIds.toArray())); Message message = getMessageForResponse(exchange); message.setBody(result); } @@ -351,6 +358,7 @@ public class EC2Producer extends DefaultProducer { LOG.trace("Unmonitor Instances command returned the error code {}", ase.getErrorCode()); throw ase; } + LOG.trace("Stop Monitoring instances with Ids [{}] ", Arrays.toString(instanceIds.toArray())); Message message = getMessageForResponse(exchange); message.setBody(result); }
