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
diff --git a/site/docs/bazel-user-manual.html b/site/docs/bazel-user-manual.html
index d13b7b6..7ed1c69 100644
--- a/site/docs/bazel-user-manual.html
+++ b/site/docs/bazel-user-manual.html
@@ -2408,7 +2408,7 @@
 </p>
 
 <pre>
-  &gt;&gt;&gt;&gt;&gt; # //examples/cpp:hello-world
+  &gt;&gt;&gt;&gt;&gt; # //examples/cpp:hello-world [action 'Linking bazel-out/local_linux-fastbuild/bin/examples/cpp/hello-world']
   (cd /var/tmp/_bazel_jrluser/4c084335afceb392cfbe7c31afee3a9f/base_workspace && \
     exec env - \
     /usr/bin/gcc -o bazel-out/local_linux-fastbuild/bin/examples/cpp/hello-world bazel-out/local_linux-fastbuild/bin/examples/cpp/_objs/hello-world/examples/cpp/hello-world.pic.o bazel-out/local_linux-fastbuild/bin/examples/cpp/libhello-lib.a bazel-out/local_linux-fastbuild/bin/tools/cpp/libmalloc.a -lstdc++ -B/usr/bin -Wl,-S)
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 32cc2cf..81c5692 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 @@
       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 fc2387c..662c35e 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 @@
       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.