Use message templates in ILogger calls
ProprietaryReplace interpolated or concatenated messages passed to Microsoft.Extensions.Logging Log* methods with a constant message template and arguments (CA2254). This keeps the values available to structured logging providers and avoids formatting the message when the log level is disabled.
OpenRewrite. Recipes. CSharp. CodeQuality. Logging. UseLoggingMessageTemplatesmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Logging. UseLoggingMessageTemplatesInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.