ngm / Pickles.NetCore

Proof-of-concept port of Pickles (https://github.com/picklesdoc/pickles) to .NET Core
0 stars 0 forks source link

Use of reflection for logger names #4

Open ngm opened 7 years ago

ngm commented 7 years ago

Currently reflection is used to get the name for the NLog logger in a number of places.

private static readonly Logger Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.Name);

The Reflection APIs have changed for .NET Core. (Although, the old APIs may be returning: https://blogs.msdn.microsoft.com/dotnet/2016/05/27/making-it-easier-to-port-to-net-core/) Need to investigate what is the alternative in the short-term, and what is the recommended API going forward.