Skip to content

Conversation

@abhiramch018
Copy link
Contributor

@abhiramch018 abhiramch018 commented Nov 25, 2025

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 #48559

Summary

Describe your changes here.

Fixes #Issue_Number (if available)


Internal previews

📄 File 🔗 Preview link
docs/framework/configure-apps/file-schema/trace-debug/add-element-for-listeners-for-trace.md <add> Element for <listeners> for <trace>

### 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
@abhiramch018 abhiramch018 requested a review from a team as a code owner November 25, 2025 12:01
@dotnetrepoman dotnetrepoman bot added this to the November 2025 milestone Nov 25, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-framework/svc community-contribution Indicates PR is created by someone from the .NET community. labels Nov 25, 2025
@abhiramch018
Copy link
Contributor Author

Hi @dotnet/docs team
I’ve reviewed this issue and would love to help move it forward.
If any specific changes, edits, or testing are still needed, I’d be happy to assist — please let me know!

Kindly requesting a quick review when you get a chance
I won’t close the issue yet, just keeping it active for collaboration.

Thanks for your time and all the great documentation work you do

@abhiramch018
Copy link
Contributor Author

Hi @gewarren,
Could you please take a quick look at this PR when you get a chance? It adds the missing DefaultTraceListener entry to the trace listener table for better clarity in .NET Framework configuration docs. Appreciate your time and review

|<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.|

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.|

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.|

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:

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.|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-framework/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The table listing listener class missing "DefaultTraceListener" entry

3 participants