Skip to content

Conversation

@gewarren
Copy link
Contributor

@gewarren gewarren commented Feb 3, 2026

Replaces #51382.

Fixes #40870.

  • Moves all logging docs under a "logging" subfolder and updates all backlinks.
  • Updates high performance logging doc to focus on source-generation instead of LoggerMessage.Define.

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/core/diagnostics/diagnostic-resource-monitoring.md Resource monitoring
docs/core/diagnostics/index.md Diagnostics in .NET
docs/core/diagnostics/logging-tracing.md Logging and tracing - .NET
docs/core/diagnostics/metrics-strongly-typed.md Source-generated metrics with strongly-typed tags
docs/core/diagnostics/observability-otlp-example.md docs/core/diagnostics/observability-otlp-example
docs/core/diagnostics/observability-prgrja-example.md Example: Use OpenTelemetry with Prometheus, Grafana, and Jaeger
docs/core/diagnostics/observability-with-otel.md .NET Observability with OpenTelemetry
docs/core/extensions/generic-host.md .NET Generic Host
docs/core/extensions/httpclient-factory.md IHttpClientFactory with .NET
docs/core/extensions/localization.md Localization in .NET
docs/core/extensions/logging/console-log-formatter.md docs/core/extensions/logging/console-log-formatter
docs/core/extensions/logging/custom-provider.md Implement a custom logging provider in .NET
docs/core/extensions/logging/high-performance-logging.md High-performance logging
docs/core/extensions/logging/library-guidance.md Logging guidance for .NET library authors
docs/core/extensions/logging/log-buffering.md docs/core/extensions/logging/log-buffering
docs/core/extensions/logging/log-sampling.md Log sampling in .NET
docs/core/extensions/logging/overview.md Logging in C# and .NET
docs/core/extensions/logging/providers.md Logging providers
docs/core/extensions/logging/source-generation.md Compile-time logging source generation
docs/core/extensions/primitives.md docs/core/extensions/primitives
docs/core/extensions/windows-service.md Create Windows Service using BackgroundService
docs/core/whats-new/dotnet-6.md What's new in .NET 6
docs/fundamentals/code-analysis/quality-rules/ca1848.md CA1848: Use the LoggerMessage delegates
docs/fundamentals/code-analysis/quality-rules/ca1873.md CA1873: Avoid potentially expensive logging
docs/fundamentals/code-analysis/quality-rules/ca2023.md docs/fundamentals/code-analysis/quality-rules/ca2023
docs/fundamentals/code-analysis/quality-rules/ca2254.md CA2254: Template should be a static expression
docs/fundamentals/syslib-diagnostics/syslib1027.md SYSLIB1027 error
docs/fundamentals/toc.yml docs/fundamentals/toc
docs/orleans/host/monitoring/index.md Orleans observability
docs/standard/runtime-libraries-overview.md Runtime libraries overview

@dotnetrepoman dotnetrepoman bot added this to the February 2026 milestone Feb 3, 2026
@gewarren gewarren changed the title Logging modern Update logging docs Feb 3, 2026
@gewarren gewarren marked this pull request as ready for review February 3, 2026 23:21
@gewarren gewarren requested a review from a team as a code owner February 3, 2026 23:21
Copilot AI review requested due to automatic review settings February 3, 2026 23:21
@gewarren gewarren removed the request for review from meaghanlewis February 3, 2026 23:21
@gewarren gewarren requested a review from meaghanlewis February 3, 2026 23:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request reorganizes the logging documentation by moving all logging-related docs and snippets into a dedicated "logging" subfolder under docs/core/extensions/. The PR also modernizes the high-performance logging documentation to prioritize source-generated logging (using LoggerMessageAttribute) over the legacy LoggerMessage.Define approach.

Changes:

  • Moved 9 logging documentation files to docs/core/extensions/logging/ subfolder with appropriate redirections
  • Rewrote high-performance-logging.md to focus on source-generated logging as the primary approach, relegating LoggerMessage.Define to a legacy section
  • Updated 30+ files with corrected path references to moved logging documentation

Reviewed changes

Copilot reviewed 39 out of 43 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
high-performance-logging.md Complete rewrite focusing on source-generated logging with LoggerMessageAttribute as primary approach
source-generation.md Updated snippet paths to reflect new folder structure
overview.md Updated relative paths for snippets and cross-references
providers.md Updated relative paths for snippets and cross-references
console-log-formatter.md Updated relative paths and improved wording
custom-provider.md Updated relative paths and improved contractions
library-guidance.md Updated relative paths and improved style
log-sampling.md Updated relative paths throughout
log-buffering.md Updated relative paths throughout
.openpublishing.redirection.core.json Added 9 redirect entries for moved files
Multiple cross-referencing files Updated 20+ files to reference new logging documentation paths
Project files Updated target frameworks to net10.0 (may need review)
Comments suppressed due to low confidence (1)

docs/core/extensions/logging/console-log-formatter.md:14

  • According to Markdown Writing Style Guidelines (Guideline 1000002), avoid using "you will" in instructions. Change "you will learn" to present tense "you learn" or use imperative mood. The sentence should read "In this article, you learn about console log formatters."

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

This LGTM @gewarren

Let's :shipit:

@gewarren gewarren merged commit f2af48c into dotnet:main Feb 4, 2026
9 checks passed
@gewarren
Copy link
Contributor Author

gewarren commented Feb 4, 2026

Thanks @BillWagner

@gewarren gewarren deleted the logging-modern branch February 4, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update LoggerMessage.Define() to be source generated logging

2 participants