You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/11/23 19:29:36 UTC
[07/20] incubator-brooklyn git commit: Add 'this' to loggers for
context.
Add 'this' to loggers for context.
https://github.com/apache/incubator-brooklyn/pull/1030#discussion_r44859887
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/f6801227
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/f6801227
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/f6801227
Branch: refs/heads/master
Commit: f6801227a90ebe0710a4f98509e61036606a2e81
Parents: cff1961
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Tue Nov 17 12:23:46 2015 +0000
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Tue Nov 17 12:23:46 2015 +0000
----------------------------------------------------------------------
.../apache/brooklyn/test/framework/SimpleCommandImpl.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f6801227/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleCommandImpl.java
----------------------------------------------------------------------
diff --git a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleCommandImpl.java b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleCommandImpl.java
index b339e4d..39193ac 100644
--- a/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleCommandImpl.java
+++ b/usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleCommandImpl.java
@@ -83,8 +83,8 @@ public class SimpleCommandImpl extends AbstractEntity implements SimpleCommand {
* Gives the opportunity to sub-classes to do additional work based on the result of the command.
*/
protected void handle(SimpleCommand.Result result) {
- LOG.debug("Result is {}\nwith output [\n{}\n] and error [\n{}\n]", new Object[] {
- result.getExitCode(), shorten(result.getStdout()), shorten(result.getStderr())
+ LOG.debug("{}, Result is {}\nwith output [\n{}\n] and error [\n{}\n]", new Object[] {
+ this, result.getExitCode(), shorten(result.getStdout()), shorten(result.getStderr())
});
}
@@ -108,13 +108,13 @@ public class SimpleCommandImpl extends AbstractEntity implements SimpleCommand {
@Override
public void stop() {
- LOG.debug("Stopping simple command");
+ LOG.debug("{} Stopping simple command", this);
setUpAndRunState(false, STOPPED);
}
@Override
public void restart() {
- LOG.debug("Restarting simple command");
+ LOG.debug("{} Restarting simple command", this);
setUpAndRunState(true, RUNNING);
}
@@ -189,7 +189,7 @@ public class SimpleCommandImpl extends AbstractEntity implements SimpleCommand {
SshMachineLocation machine = getSshMachine(ImmutableList.of(machineLocation));
SshEffectorTasks.SshEffectorTaskFactory<Integer> etf = SshEffectorTasks.ssh(machine, command);
- LOG.debug("Creating task to execute '{}' on location {}", command, machine);
+ LOG.debug("{} Creating task to execute '{}' on location {}", new Object[] {this, command, machine});
ProcessTaskWrapper<Integer> job = DynamicTasks.queue(etf);
DynamicTasks.waitForLast();
return buildResult(job);