1

I'm trying to get log4net to work with Simple Injector by following the advice from this answer. However, it appears that LogImpl now requires a constructor with an ILogger as a parameter:

There is no argument given that corresponds to the required formal parameter 'logger' of 'LogImpl.LogImpl(ILogger)'.

image

Is there anyone that uses another method to accomplish this?

Steven
  • 166,672
  • 24
  • 332
  • 435
D. Joe
  • 25
  • 3

1 Answers1

0

There seems to be a breaking change in the LogImpl class. You can change your Log4NetAdapter<T> class to the following:

public sealed class Log4NetAdapter<T> : LogImpl
{
    public Log4NetAdapter() : base(LogManager.GetLogger(typeof(T)).Logger) { }
}
Steven
  • 166,672
  • 24
  • 332
  • 435