From 36234e92c0ca57649c1de70cf7608f48a0053e1b Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Fri, 1 Aug 2025 18:06:26 -0700 Subject: [PATCH 1/7] draft --- aspnetcore/fundamentals/http-logging/index.md | 2 +- .../http-logging/samples-snpshot/9.x/Program.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 aspnetcore/fundamentals/http-logging/samples-snpshot/9.x/Program.cs diff --git a/aspnetcore/fundamentals/http-logging/index.md b/aspnetcore/fundamentals/http-logging/index.md index 0455181c262b..7a40e3f74532 100644 --- a/aspnetcore/fundamentals/http-logging/index.md +++ b/aspnetcore/fundamentals/http-logging/index.md @@ -212,7 +212,7 @@ The following list shows the order of precedence for logging configuration: Http logging with redaction can be enabled by calling : -[!code-csharp[](~/fundamentals/http-logging/samples/9.x/Program.cs?name=snippet7&highlight=9)] +[!code-csharp[](~/fundamentals/http-logging/samples-snapshot/9.x/Program.cs?name=snippet7&highlight=9)] For more information about .NET's data redaction library, see [Data redaction in .NET](/dotnet/core/extensions/data-redaction). diff --git a/aspnetcore/fundamentals/http-logging/samples-snpshot/9.x/Program.cs b/aspnetcore/fundamentals/http-logging/samples-snpshot/9.x/Program.cs new file mode 100644 index 000000000000..e22e575bd824 --- /dev/null +++ b/aspnetcore/fundamentals/http-logging/samples-snpshot/9.x/Program.cs @@ -0,0 +1,13 @@ +// +// +var builder = WebApplication.CreateBuilder(args); + +builder.Services.AddHttpLogging(logging => +{ + logging.LoggingFields = HttpLoggingFields.Duration; +}); +builder.Services.AddHttpLoggingInterceptor(); +// +builder.Services.AddRedaction(); +builder.Services.AddHttpLoggingRedaction(op => { }); +// From cf4e005da149c249efdaf9bf68671a61a95e496c Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Sat, 2 Aug 2025 15:37:13 -0700 Subject: [PATCH 2/7] file renamed --- .../{samples-snpshot => samples-snapshot}/9.x/Program.cs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename aspnetcore/fundamentals/http-logging/{samples-snpshot => samples-snapshot}/9.x/Program.cs (100%) diff --git a/aspnetcore/fundamentals/http-logging/samples-snpshot/9.x/Program.cs b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs similarity index 100% rename from aspnetcore/fundamentals/http-logging/samples-snpshot/9.x/Program.cs rename to aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs From a16f89bcabe019216ab6377fc6735f4564ae5f69 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Mon, 4 Aug 2025 13:08:19 -0700 Subject: [PATCH 3/7] draft --- .../fundamentals/http-logging/samples-snapshot/9.x/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs index e22e575bd824..7bb8a96c7739 100644 --- a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs +++ b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs @@ -6,7 +6,6 @@ { logging.LoggingFields = HttpLoggingFields.Duration; }); -builder.Services.AddHttpLoggingInterceptor(); // builder.Services.AddRedaction(); builder.Services.AddHttpLoggingRedaction(op => { }); From 9e880c6440fc1225220bae5f5b6ba63bdcf6a438 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Mon, 4 Aug 2025 13:31:28 -0700 Subject: [PATCH 4/7] move a blank line --- .../fundamentals/http-logging/samples-snapshot/9.x/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs index 7bb8a96c7739..bf748c0ba65e 100644 --- a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs +++ b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs @@ -6,6 +6,7 @@ { logging.LoggingFields = HttpLoggingFields.Duration; }); + // builder.Services.AddRedaction(); builder.Services.AddHttpLoggingRedaction(op => { }); From 55b8fb5ee18a4ede47b6b70d1d6e5d1d8c6fc422 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Mon, 4 Aug 2025 13:43:13 -0700 Subject: [PATCH 5/7] remove // --- aspnetcore/fundamentals/http-logging/index.md | 2 +- .../fundamentals/http-logging/samples-snapshot/9.x/Program.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/aspnetcore/fundamentals/http-logging/index.md b/aspnetcore/fundamentals/http-logging/index.md index 7a40e3f74532..d3b465d2545c 100644 --- a/aspnetcore/fundamentals/http-logging/index.md +++ b/aspnetcore/fundamentals/http-logging/index.md @@ -212,7 +212,7 @@ The following list shows the order of precedence for logging configuration: Http logging with redaction can be enabled by calling : -[!code-csharp[](~/fundamentals/http-logging/samples-snapshot/9.x/Program.cs?name=snippet7&highlight=9)] +[!code-csharp[](~/fundamentals/http-logging/samples-snapshot/9.x/Program.cs?name=snippet7&highlight=10)] For more information about .NET's data redaction library, see [Data redaction in .NET](/dotnet/core/extensions/data-redaction). diff --git a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs index bf748c0ba65e..c3428896fcc9 100644 --- a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs +++ b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs @@ -1,5 +1,5 @@ // -// + var builder = WebApplication.CreateBuilder(args); builder.Services.AddHttpLogging(logging => @@ -7,7 +7,6 @@ logging.LoggingFields = HttpLoggingFields.Duration; }); -// builder.Services.AddRedaction(); builder.Services.AddHttpLoggingRedaction(op => { }); // From 11b583208833e9d902a7cc00dddf583c15a65e25 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Mon, 4 Aug 2025 15:00:32 -0700 Subject: [PATCH 6/7] Update aspnetcore/fundamentals/http-logging/index.md Co-authored-by: Brennan --- aspnetcore/fundamentals/http-logging/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/fundamentals/http-logging/index.md b/aspnetcore/fundamentals/http-logging/index.md index d3b465d2545c..7a40e3f74532 100644 --- a/aspnetcore/fundamentals/http-logging/index.md +++ b/aspnetcore/fundamentals/http-logging/index.md @@ -212,7 +212,7 @@ The following list shows the order of precedence for logging configuration: Http logging with redaction can be enabled by calling : -[!code-csharp[](~/fundamentals/http-logging/samples-snapshot/9.x/Program.cs?name=snippet7&highlight=10)] +[!code-csharp[](~/fundamentals/http-logging/samples-snapshot/9.x/Program.cs?name=snippet7&highlight=9)] For more information about .NET's data redaction library, see [Data redaction in .NET](/dotnet/core/extensions/data-redaction). From a42b09151f5623a73cee051d27359603990ca701 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Mon, 4 Aug 2025 15:35:59 -0700 Subject: [PATCH 7/7] Update Program.cs --- .../fundamentals/http-logging/samples-snapshot/9.x/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs index c3428896fcc9..3af11c0693ef 100644 --- a/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs +++ b/aspnetcore/fundamentals/http-logging/samples-snapshot/9.x/Program.cs @@ -1,5 +1,4 @@ // - var builder = WebApplication.CreateBuilder(args); builder.Services.AddHttpLogging(logging =>