diff --git a/src/SharedKernel/Logging/Middleware/LogFormatting.cs b/src/SharedKernel/Logging/Middleware/LogFormatting.cs index 8a2b757..56edec5 100644 --- a/src/SharedKernel/Logging/Middleware/LogFormatting.cs +++ b/src/SharedKernel/Logging/Middleware/LogFormatting.cs @@ -1,4 +1,5 @@ -using System.Text.Json; +using System.Text.Encodings.Web; +using System.Text.Json; namespace SharedKernel.Logging.Middleware; @@ -7,7 +8,9 @@ internal static class LogFormatting private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = false, - PropertyNamingPolicy = null + PropertyNamingPolicy = null, + // This allows non-ASCII characters (Armenian, Cyrillic, etc.) to pass through without escaping + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; public static object Omitted(string reason, long? lengthBytes, string? mediaType, int thresholdBytes) diff --git a/src/SharedKernel/SharedKernel.csproj b/src/SharedKernel/SharedKernel.csproj index 2f2a48b..639acb6 100644 --- a/src/SharedKernel/SharedKernel.csproj +++ b/src/SharedKernel/SharedKernel.csproj @@ -8,13 +8,13 @@ Readme.md Pandatech MIT - 2.1.0 + 2.1.1 Pandatech.SharedKernel Pandatech Shared Kernel Library Pandatech, shared kernel, library, OpenAPI, Swagger, utilities, scalar Pandatech.SharedKernel provides centralized configurations, utilities, and extensions for ASP.NET Core projects. For more information refere to readme.md document. https://github.com/PandaTechAM/be-lib-sharedkernel - request/response logging enhancement + url encoded support + nuget updates and small perf boosts + request/response logging armenian support