static MLog() { FileLogs.InitLogger(); try { _eLogs = bool.Parse(ConfigurationManager.AppSettings["Logs"].ToString()); _eLogErrors = bool.Parse(ConfigurationManager.AppSettings["LogErrors"].ToString()); _dbLogs = bool.Parse(ConfigurationManager.AppSettings["dbLogs"].ToString()); _dbLogErrors = bool.Parse(ConfigurationManager.AppSettings["dbLogErrors"].ToString()); _fLogs = bool.Parse(ConfigurationManager.AppSettings["fLogs"].ToString()); _fLogErrors = bool.Parse(ConfigurationManager.AppSettings["fLogErrors"].ToString()); } catch (Exception e) { LogError(e, String.Format("Ошибка чтения AppSettings:(Logs,LogErrors,dbLogs,dbLogErrors,fLogs,fLogErrors)")); } }
static MEventLog() { FileLogs.InitLogger(); try { eventSourceName = ConfigurationManager.AppSettings["eventSourceName"].ToString(); logName = ConfigurationManager.AppSettings["logName"].ToString(); } catch (Exception e) { eventSourceName = "RailWay"; logName = "RailWayLogFile1"; LogError(e, String.Format("Ошибка чтения AppSettings:(eventSourceName,logName)")); } try { EventLogs.InitEventLogs(eventSourceName, logName); } catch (Exception e) { LogError(e, String.Format("Ошибка выполнения метода EventLogs.InitEventLogs(eventSourceName={0}, logName={1})", eventSourceName, logName)); } }
static MFileLogs() { FileLogs.InitLogger(); }
static WebLogs() { FileLogs.InitLogger(); }
static EventLogs() { FileLogs.InitLogger(); }
static ServicesLogs() { FileLogs.InitLogger(); }