diff options
author | 2015-05-18 14:35:32 +0000 | |
---|---|---|
committer | 2015-05-18 20:01:42 +0000 | |
commit | 142c897cc1f71d3d094d365c499a62c0eab87017 (patch) | |
tree | 6bb241ea383a6e3080fb049837eed51bf88b04f2 /src/main/java/com/google/devtools/build | |
parent | fe76e11bc400fcfa2d0624f7ec6ee4505f1a670a (diff) |
Better distinguish subcommand log statements by logging description
Now, when subcommands are logged due to the -s option, the action's
description is logged in an bracketed note after the label.
--
MOS_MIGRATED_REVID=93886445
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/standalone/LinuxSandboxedStrategy.java | 5 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/standalone/LocalSpawnStrategy.java | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/standalone/LinuxSandboxedStrategy.java b/src/main/java/com/google/devtools/build/lib/standalone/LinuxSandboxedStrategy.java index 32cc2cf145..81c56929e8 100644 --- a/src/main/java/com/google/devtools/build/lib/standalone/LinuxSandboxedStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/standalone/LinuxSandboxedStrategy.java @@ -63,8 +63,9 @@ public class LinuxSandboxedStrategy implements SpawnActionContext { throws ExecException { Executor executor = actionExecutionContext.getExecutor(); if (executor.reportsSubcommands()) { - executor.reportSubcommand(Label.print(spawn.getOwner().getLabel()), - spawn.asShellCommand(executor.getExecRoot())); + executor.reportSubcommand( + Label.print(spawn.getOwner().getLabel()) + " [" + spawn.getResourceOwner().prettyPrint() + + "]", spawn.asShellCommand(executor.getExecRoot())); } boolean processHeaders = spawn.getResourceOwner() instanceof CppCompileAction; diff --git a/src/main/java/com/google/devtools/build/lib/standalone/LocalSpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/standalone/LocalSpawnStrategy.java index fc2387c896..662c35ea07 100644 --- a/src/main/java/com/google/devtools/build/lib/standalone/LocalSpawnStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/standalone/LocalSpawnStrategy.java @@ -57,8 +57,9 @@ public class LocalSpawnStrategy implements SpawnActionContext { throws ExecException { Executor executor = actionExecutionContext.getExecutor(); if (executor.reportsSubcommands()) { - executor.reportSubcommand(Label.print(spawn.getOwner().getLabel()), - spawn.asShellCommand(executor.getExecRoot())); + executor.reportSubcommand( + Label.print(spawn.getOwner().getLabel()) + " [" + spawn.getResourceOwner().prettyPrint() + + "]", spawn.asShellCommand(executor.getExecRoot())); } // We must wrap the subprocess with process-wrapper to kill the process tree. |