Skip to content

Doc: Clarify W3CLogger service registration and default log location (#33592) - #37796

Open
SkyDevLab wants to merge 8 commits into
dotnet:mainfrom
SkyDevLab:docs/33592-w3clogger-addw3clogging-clarification
Open

SkyDevLab wants to merge 8 commits into
dotnet:mainfrom
SkyDevLab:docs/33592-w3clogger-addw3clogging-clarification

Conversation

@SkyDevLab

@SkyDevLab SkyDevLab commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #33592

Summary of Changes

  • Clarified that enabling W3CLogger requires registering the required services using AddW3CLogging before adding the middleware via UseW3CLogging in the request processing pipeline. Previously, only UseW3CLogging was shown in the "Enable W3CLogger" snippet, which leads to InvalidOperationException at startup if AddW3CLogging was omitted.
  • Documented the default log output location (./logs/ relative to the content root directory) and filename format (w3clog- prefix).
  • Documented the configuration options supported by W3CLoggerOptions (such as LogDirectory, FileName, FileSizeLimit, FlushInterval, and RetainedFileCountLimit).
  • Updated ms.date.

Internal previews

File Preview link
aspnetcore/fundamentals/w3c-logger/index.md Learn preview

Build report

@guardrex guardrex self-assigned this Oct 8, 2026
guardrex

This comment was marked as resolved.

@SkyDevLab

Copy link
Copy Markdown
Contributor Author

Thanks @guardrex! Updated to apply all suggestions.

@SkyDevLab

Copy link
Copy Markdown
Contributor Author

Thank you @guardrex! I have removed author and ms.author from the metadata per your feedback.

@guardrex

This comment was marked as resolved.

@guardrex

This comment was marked as resolved.

@guardrex
guardrex requested a balanced review from Copilot October 9, 2026 12:26

This comment was marked as resolved.

Corrected the sentence structure for clarity regarding adding the W3CLogger middleware.

This comment was marked as resolved.

Removed redundant section on LoggingFields from documentation.

This comment was marked as resolved.

@guardrex
guardrex requested a balanced review from Copilot October 9, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@guardrex
guardrex requested review from gewarren and a balanced review from Copilot October 9, 2026 13:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The guidance and API references accurately address the reported documentation gap.

0 open findings

🧠 Review effort: Balanced

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

W3CLogger documentation leads to an error and does not explain where the logs can be found

3 participants