.NET 10 drops duplicate State.Message in JSON console logs, breaking some parsers
Microsoft's .NET 10 introduces a breaking change to JSON console logging, removing the duplicate rendered message previously found at State.Message in AddJsonConsole output. Parsers or scripts that relied solely on the nested State.Message property may now receive null values, even though the application continues logging normally. The top-level Message field remains the canonical source for the rendered log text, while State still retains structured values such as OrderId, Status, and the original format template. Microsoft notes that State.Message may still appear when its content differs from the top-level value, so parsers should read the top-level field first and treat the nested one as a fallback. Developers are advised to treat console JSON output as a versioned schema and add contract tests when upgrading runtimes, rather than relying on visual terminal checks alone.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in