Use Trace.WriteLine instead of Debug.WriteLine for the Debug option (#1719)

* Use Trace.WriteLine instead of Debug.WriteLine for the Debug option

* Updated the CHANGELOG.md
This commit is contained in:
Utkarsh Umesan Pillai 2021-01-25 09:36:53 -08:00 committed by GitHub
parent 02adc4cce0
commit 06666cdef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,10 @@
`ConsoleExporter` to get rid of type specific check in the class
([#1593](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1593))
* Replaced Debug.WriteLine with Trace.WriteLine to display the logs to the Debug
window with Release configuration
([#1719](https://github.com/open-telemetry/opentelemetry-dotnet/pull/1719))
## 1.0.0-rc1.1
Released 2020-Nov-17

View File

@ -14,8 +14,6 @@
// limitations under the License.
// </copyright>
using System.Diagnostics;
namespace OpenTelemetry.Exporter
{
public abstract class ConsoleExporter<T> : BaseExporter<T>
@ -37,7 +35,7 @@ namespace OpenTelemetry.Exporter
if (this.options.Targets.HasFlag(ConsoleExporterOutputTargets.Debug))
{
Debug.WriteLine(message);
System.Diagnostics.Trace.WriteLine(message);
}
}
}