Pass the caught exception to ILogger calls
ProprietaryIn a catch block, Microsoft.Extensions.Logging LogWarning, LogError, LogCritical and Log(LogLevel.Warning|Error|Critical, ...) calls that pass only a message lose the exception's type and stack trace. Pass the caught exception as the exception argument, unless the catch block already logs it.
OpenRewrite. Recipes. CSharp. CodeQuality. Logging. PassCaughtExceptionToLoggermod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Logging. PassCaughtExceptionToLoggerInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.