-
Notifications
You must be signed in to change notification settings - Fork 6.1k
docs: add DefaultTraceListener entry to trace listeners table #50120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
### Summary Added the missing `DefaultTraceListener` entry to the trace listeners table in the `.NET Framework` configuration documentation. ### Why The table listing available trace listener classes did not include `DefaultTraceListener`, which caused confusion for users trying to configure it using `app.config`. This listener is automatically included by default in the `Trace.Listeners` collection, but users may want to reference it explicitly in configuration files. ### Change - Added a new row for `DefaultTraceListener` to the trace listener table in `add-element-for-listeners-for-trace.md`. - Clarified its purpose and default behavior in debugging and tracing scenarios. ### Related Issue Fixes dotnet#48559
|
Hi @dotnet/docs team Kindly requesting a quick review when you get a chance Thanks for your time and all the great documentation work you do |
|
Hi @gewarren, |
| |<xref:System.Diagnostics.TextWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.TextWriterTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.XmlWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.XmlWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| | ||
| |xref:System.Diagnostics.DefaultTraceListener?displayProperty=nameWithType|The default trace listener that outputs messages to the Visual Studio Output window or debugger. This listener is automatically included in the `Trace.Listeners` collection unless explicitly removed in the configuration.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the new xref link should have < > around it like the existing ones have.
| |<xref:System.Diagnostics.TextWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.TextWriterTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.XmlWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.XmlWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| | ||
| |xref:System.Diagnostics.DefaultTraceListener?displayProperty=nameWithType|The default trace listener that outputs messages to the Visual Studio Output window or debugger. This listener is automatically included in the `Trace.Listeners` collection unless explicitly removed in the configuration.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second column of this table is "initializeData attribute value", but DefaultTraceListener does not support initializeData. Instead of describing the purpose of DefaultTraceListener, the new row should state that initializeData is not used with that type of listener.
| |<xref:System.Diagnostics.EventSchemaTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.EventSchemaTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.TextWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.TextWriterTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.XmlWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| | ||
| |<xref:System.Diagnostics.XmlWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another similar table here:
docs/docs/framework/configure-apps/file-schema/trace-debug/add-element-for-sharedlisteners.md
Lines 66 to 75 in 0f1e282
| The following table shows the trace listeners that are included with the .NET Framework and describes the value of their `initializeData` attributes. | |
| |Trace listener class|initializeData attribute value| | |
| |--------------------------|------------------------------------| | |
| |<xref:System.Diagnostics.ConsoleTraceListener>|The `useErrorStream` value for the <xref:System.Diagnostics.ConsoleTraceListener.%23ctor%2A> constructor. Set the `initializeData` attribute to "`true`" to write trace and debug output to the standard error stream; set it to "`false`" to write to the standard output stream.| | |
| |<xref:System.Diagnostics.DelimitedListTraceListener>|The name of the file the <xref:System.Diagnostics.DelimitedListTraceListener> writes to.| | |
| |<xref:System.Diagnostics.EventLogTraceListener?displayProperty=nameWithType>|The name of an existing event log source.| | |
| |<xref:System.Diagnostics.EventSchemaTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.EventSchemaTraceListener> writes to.| | |
| |<xref:System.Diagnostics.TextWriterTraceListener?displayProperty=nameWithType>|The name of the file that the <xref:System.Diagnostics.TextWriterTraceListener> writes to.| | |
| |<xref:System.Diagnostics.XmlWriterTraceListener>|The name of the file that the <xref:System.Diagnostics.XmlWriterTraceListener> writes to.| |
Summary
Added the missing
DefaultTraceListenerentry to the trace listeners table in the.NET Frameworkconfiguration documentation.Why
The table listing available trace listener classes did not include
DefaultTraceListener, which caused confusion for users trying to configure it usingapp.config. This listener is automatically included by default in theTrace.Listenerscollection, but users may want to reference it explicitly in configuration files.Change
DefaultTraceListenerto the trace listener table inadd-element-for-listeners-for-trace.md.Related Issue
Fixes #48559
Summary
Describe your changes here.
Fixes #Issue_Number (if available)
Internal previews