Ejemplo n.º 1
0
 private void ProcessServiceCrashLogIfExisists()
 {
     // Check is there was an Service crash
     if (File.Exists(Platform.ServiceCrashInfoFilePath))
     {
         try
         {
             string serviceCrashInfo = FileUtils.TailOfLog(Platform.ServiceCrashInfoFilePath);
             // send requeest to remove crash-info file
             Service.RemoveServiceCrashFile();
             if (string.IsNullOrEmpty(serviceCrashInfo) == false)
             {
                 Dispatcher.Invoke(() =>
                 {
                     ExceptionWindow wnd = new ExceptionWindow(new IVPNServiceCrash(serviceCrashInfo), true, StringUtils.String("Crash_ServiceCrashedText"));
                     wnd.Show();
                 });
             }
         }
         catch (Exception ex)
         {
             Logging.Info($"Exception during processing Agent crash-log: {ex}");
         }
     }
 }
Ejemplo n.º 2
0
 private string GetLogFileData(string logFilePath)
 {
     return(FileUtils.TailOfLog(logFilePath, LOG_FILE_TAIL_LEN));
 }
 private string GetIVPNLog0()
 {
     return(FileUtils.TailOfLog(Platform.ServiceLogFilePath + ".0"));
 }