dotnet-installer/src/dotnet/commands/dotnet-test/TestHostTracing.cs
David Fowler dfc59eb20e Everything in the same project
- Build in intrinsic commands as part of dotnet
2016-02-01 14:56:32 -08:00

24 lines
825 B
C#

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Diagnostics;
namespace Microsoft.DotNet.Tools.Test
{
public static class TestHostTracing
{
public static readonly string TracingEnvironmentVariable = "DOTNET_TEST_TRACE";
public static readonly TraceSource Source;
static TestHostTracing()
{
Source = Environment.GetEnvironmentVariable(TracingEnvironmentVariable) == "1"
? new TraceSource("dotnet-test", SourceLevels.Verbose)
: new TraceSource("dotnet-test", SourceLevels.Warning);
Source.Listeners.Add(new TextWriterTraceListener(Console.Error));
}
}
}