Tuesday, 5 March 2019

.net core console adding log4net


Log4Net will not use the log settings in the appsetting.json file, it needs a log4net.config file 😭


  • add package



  • add config file

  • ensure it is set to copy to output directory

  • update config in file as required

  • add Log4Net into the logging framework

  • get logger via dependancy injection as per standard

No comments:

Post a Comment