From 142c897cc1f71d3d094d365c499a62c0eab87017 Mon Sep 17 00:00:00 2001 From: Mark Schaller Date: Mon, 18 May 2015 14:35:32 +0000 Subject: 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 --- .../google/devtools/build/lib/standalone/LinuxSandboxedStrategy.java | 5 +++-- .../com/google/devtools/build/lib/standalone/LocalSpawnStrategy.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/google/devtools/build') 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. -- cgit v1.2.3