0

I am porting my NET Framework application to .NET Core. I use log4net, installed NuGet package. But the code worked in NETF version cannot be compiled in NET Standard version

static public ILog MainLogger
{
    get
    {
        if (_logger == null)
        {
            _logger = LogManager.GetLogger(@"MyLibLogger");
        }
        return _logger;
    }
}

The error is: Argument 1: cannot convert from 'string' to 'System.Type'

I.e. the log4net does not contain anymore method LogManager ->GetLogger(String name);

What should I use instead of?

ZedZip
  • 5,794
  • 15
  • 66
  • 119

0 Answers0