protected static void Init()
{
try
{
//attempt to load logging configuration
System.IO.FileInfo configFile = new System.IO.FileInfo(Path.Combine(Settings.ApplicationPath, "Logging.config"));
log4net.Config.XmlConfigurator.ConfigureAndWatch(configFile);
_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
}
catch
{
ConsoleAppender con = new ConsoleAppender();
con.Layout = new PatternLayout("%message%newline");
//con.Threshold = log4net.Core.Level.Info;
log4net.Config.BasicConfigurator.Configure(con);
_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
}
}