Episerver 9 and LogManager

Vote:
 

Hi,

I've inherited an EPiServer 9 project where a logger is declared like this:

public class MyService : IMyService
{
	private readonly ILogger _logger = LogManager.GetLogger();
}

Everything works fine on my local machine, but not in production (no messages are being written to the log file).

After spending quite some time checking the assembly versions, checking if the logger is instantiated in global.asax.cs, etc. I injected ILogger in the constructor instead of using LogManager.GetLogger() and things started working fine.

Is this a known bug in Epi 9.9.1?

#173279
Dec 19, 2016 12:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.