Merge "Fix some of the logging for basic HelloWorld situation"
diff --git a/src/com/android/tradefed/invoker/InvocationExecution.java b/src/com/android/tradefed/invoker/InvocationExecution.java
index 93761bf..b27cbb3 100644
--- a/src/com/android/tradefed/invoker/InvocationExecution.java
+++ b/src/com/android/tradefed/invoker/InvocationExecution.java
@@ -711,10 +711,6 @@
         } else if (Strings.isNullOrEmpty(info.getTestTag())) {
             // We ensure that that a default test-tag is always available.
             info.setTestTag("stub");
-        } else {
-            CLog.w(
-                    "Using the test-tag from the build_provider. Consider updating your config to"
-                            + " have no alias/namespace in front of test-tag.");
         }
     }
 
diff --git a/src/com/android/tradefed/result/InvocationToJUnitResultForwarder.java b/src/com/android/tradefed/result/InvocationToJUnitResultForwarder.java
index acddd3b..9c2bc0f 100644
--- a/src/com/android/tradefed/result/InvocationToJUnitResultForwarder.java
+++ b/src/com/android/tradefed/result/InvocationToJUnitResultForwarder.java
@@ -59,7 +59,9 @@
         Test test = new TestIdentifierResult(testId);
         // TODO: is it accurate to represent the trace as AssertionFailedError?
         mJUnitListener.addFailure(test, new AssertionFailedError(trace));
-        Log.i(LOG_TAG, String.format("Test %s failed with:\n %s", testId.toString(), trace));
+        Log.w(
+                LOG_TAG,
+                String.format("\nTest %s failed with stack:\n %s", testId.toString(), trace));
     }
 
     @Override
diff --git a/src/com/android/tradefed/result/LogSaverResultForwarder.java b/src/com/android/tradefed/result/LogSaverResultForwarder.java
index 71fc0f6..cf11160 100644
--- a/src/com/android/tradefed/result/LogSaverResultForwarder.java
+++ b/src/com/android/tradefed/result/LogSaverResultForwarder.java
@@ -20,6 +20,7 @@
 import com.android.tradefed.invoker.TestInvocation;
 import com.android.tradefed.log.LogRegistry;
 import com.android.tradefed.log.LogUtil.CLog;
+import com.android.tradefed.log.StdoutLogger;
 import com.android.tradefed.util.StreamUtil;
 import com.android.tradefed.util.SystemUtil;
 
@@ -73,7 +74,11 @@
         LogRegistry registry = (LogRegistry) LogRegistry.getLogRegistry();
         try (InputStreamSource source = registry.getLogger().getLog()) {
             if (source == null) {
-                CLog.e("%s stream was null, skip saving it.", TestInvocation.TRADEFED_END_HOST_LOG);
+                if (!(registry.getLogger() instanceof StdoutLogger)) {
+                    CLog.e(
+                            "%s stream was null, skip saving it.",
+                            TestInvocation.TRADEFED_END_HOST_LOG);
+                }
                 return;
             }
             try (InputStream stream = source.createInputStream()) {
diff --git a/src/com/android/tradefed/result/TextResultReporter.java b/src/com/android/tradefed/result/TextResultReporter.java
index af19128..c67ab81 100644
--- a/src/com/android/tradefed/result/TextResultReporter.java
+++ b/src/com/android/tradefed/result/TextResultReporter.java
@@ -44,14 +44,12 @@
      */
     @Override
     public void testFailed(TestDescription testId, String trace) {
-        ResultPrinter printer = (ResultPrinter)getJUnitListener();
-        printer.getWriter().format("\nTest %s: failed \n stack: %s ", testId, trace);
+        super.testFailed(testId, trace);
     }
 
     @Override
     public void testAssumptionFailure(TestDescription testId, String trace) {
-        ResultPrinter printer = (ResultPrinter)getJUnitListener();
-        printer.getWriter().format("\nTest %s: assumption failed \n stack: %s ", testId, trace);
+        super.testAssumptionFailure(testId, trace);
     }
 
     /** Overrides parent to explicitly print out test metrics. */