Autofac.Extras.NLog icon indicating copy to clipboard operation
Autofac.Extras.NLog copied to clipboard

Unfortune method to log exception

Open rosieks opened this issue 8 years ago • 4 comments

ILogger interface has unfortune method void Error([Localizable(false)] string message, Exception exception). It's fine when I pass Exception class, but when I pass any other exception C# compiler choose different method to use: void Error<TArgument>([Localizable(false)] string message, TArgument argument).

The effect is that exception details are not logged. I suggest to change order of parameters and deprecate original method.

rosieks avatar Nov 06 '16 20:11 rosieks

I've opened #15 regarding this issue, but the author is not responding :<

shoftee avatar Oct 12 '17 08:10 shoftee

Hi @all sorry for late response, it is merged and will be pushed soon, @shoftee thanks for your contribution 👍

bugthesystem avatar Oct 12 '17 09:10 bugthesystem

I think this could be closed with the release of 2.0.0-rc

304NotModified avatar Mar 23 '19 03:03 304NotModified

@rosieks @shoftee @304NotModified Can you verify its working now in your projects with current versions of the NuGet packages?

CNBoland avatar Aug 18 '21 15:08 CNBoland