====== Log4net configuration ======
**web.config - add section:**
...
**web.config - log4net configuration:**
"
**Tell application where is config - AssemblyInfo.cs:**
// log4net
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Web.config", Watch = true)]
**How use it in code:**
public readonly ILog log_Global = LogManager.GetLogger("Global");
public readonly ILog log_Error = LogManager.GetLogger("Error");
...
log_Global.Info("Application started.");
...
try
{
...
}
catch (Exception ex)
{
log_Error.Fatal("Fatal Error when ..." , ex);
}
===== Debuging =====
**Allow internal debugging in appsettings**
**Add listener**