예제 #1
0
 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)"));
     }
 }
예제 #2
0
        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));
            }
        }
예제 #3
0
 static MFileLogs()
 {
     FileLogs.InitLogger();
 }
예제 #4
0
 static WebLogs()
 {
     FileLogs.InitLogger();
 }
예제 #5
0
 static EventLogs()
 {
     FileLogs.InitLogger();
 }
예제 #6
0
 static ServicesLogs()
 {
     FileLogs.InitLogger();
 }