Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XmlConfigurator.Configure() does not accept 0 arguments

Tags:

log4net

I have code that used:

log4net.2.0.8\lib\net45-full\log4net.dll

XmlConfigurator.Configure();

when I change this to use log4net\2.0.8\lib\netstandard1.3\log4net.dll

I get no overload for method 'Configure' takes 0 arguments.

like image 634
andrew pate Avatar asked Sep 03 '25 03:09

andrew pate


1 Answers

I found the solution here was to use the code:

 var logRepo = LogManager.GetRepository(Assembly.GetEntryAssembly());
 XmlConfigurator.Configure(logRepo, new FileInfo("log4net.config"));
like image 128
andrew pate Avatar answered Sep 05 '25 22:09

andrew pate