0

I'm working in a MVC project, which has several controllers. Each has in the beginning

private static readonly ILog Logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

In c#, I was using loggers in exception. I can't understand why each controller has its own logger.

Alaa'
  • 487
  • 3
  • 7
  • 16

1 Answers1

0

hi it looks like log4net declaration. its a tool to log your error in all kind of .net program like web app ,console, windows etc. so that exceptions are logged and developers know what exactly gone wrong am mentioning link for a tutorial if you want additional information on matter.

https://www.codeproject.com/Articles/140911/log-net-Tutorial