dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.98k stars 4.66k forks source link

[API Proposal]: TraceSource add Write serie methods #58546

Open taozuhong opened 3 years ago

taozuhong commented 3 years ago

Background and motivation

Want to write a clear message via TraceSource to its listener, so we need to add methods: Write WriteLine

API Proposal

...

API Usage

// Fancy the value
var traceSource = new TraceSource("sample", SourceLevels.All);
traceSource.Write("Clear message");
traceSource.WriteLine("Clear message");

Risks

No response

ghost commented 3 years ago

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti See info in area-owners.md if you want to be subscribed.

Issue Details
### Background and motivation Want to write a clear message via TraceSource to its listener, so we need to add methods: Write WriteLine ### API Proposal ... ### API Usage ```C# // Fancy the value var traceSource = new TraceSource("sample", SourceLevels.All); traceSource.Write("Clear message"); traceSource.WriteLine("Clear message"); ``` ### Risks _No response_
Author: taozuhong
Assignees: -
Labels: `api-suggestion`, `area-System.Diagnostics.Tracing`, `untriaged`
Milestone: -