diff --git a/Tests/DistTestCore/Global.cs b/Tests/DistTestCore/Global.cs index 4ba1374b..ddd7a5cc 100644 --- a/Tests/DistTestCore/Global.cs +++ b/Tests/DistTestCore/Global.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System.Diagnostics; +using System.Reflection; using Core; using Logging; @@ -33,7 +34,9 @@ namespace DistTestCore { try { - Stopwatch.Measure(log, "Global setup", () => + Trace.Listeners.Add(new ConsoleTraceListener()); + + Logging.Stopwatch.Measure(log, "Global setup", () => { globalEntryPoint.Announce(); globalEntryPoint.Tools.CreateWorkflow().DeleteNamespacesStartingWith(TestNamespacePrefix, wait: true); @@ -55,6 +58,8 @@ namespace DistTestCore deleteTrackedFiles: true, waitTillDone: true ); + + Trace.Flush(); } } } diff --git a/Tests/DistTestCore/Logs/BaseTestLog.cs b/Tests/DistTestCore/Logs/BaseTestLog.cs index e670e0c1..51775512 100644 --- a/Tests/DistTestCore/Logs/BaseTestLog.cs +++ b/Tests/DistTestCore/Logs/BaseTestLog.cs @@ -59,24 +59,8 @@ namespace DistTestCore.Logs protected static ILog CreateMainLog(string fullName, string name) { - ILog log = new FileLog(fullName); - log = ApplyConsoleOutput(log); - return log; - } - - private static ILog ApplyConsoleOutput(ILog log) - { - // If we're running as a release test, we'll split the log output - // to the console as well. - - var testType = Environment.GetEnvironmentVariable("TEST_TYPE"); - if (string.IsNullOrEmpty(testType) || testType.ToLowerInvariant() != "release-tests") - { - return log; - } - return new LogSplitter( - log, + new FileLog(fullName), new ConsoleLog() ); }