예제 #1
0
 /// <summary>
 /// 로그파일 생성 및 쓰기
 /// </summary>
 /// <param name="_log"></param>
 public void logFileWrite(string _log)
 {
     try
     {
         if (!di.Exists)
         {
             FolderCheck();
         }
         try
         {
             sw = new StreamWriter(Application.StartupPath + "\\LicenseManager_" + DateTime.Now.ToShortDateString() + ".log", true);
             sw.WriteLine(_log);
             sw.Close();
         }
         catch (Exception e)
         {
             if (this.InvokeRequired)
             {
                 LogDele dele = new LogDele(logFileWrite);
                 Invoke(dele, "logFileWriter() 에러 : " + e.ToString());
             }
             else
             {
                 logWriter("logFileWriter() 에러 : " + e.ToString());
             }
         }
     }
     catch (Exception exception)
     {
         logWriter(exception.ToString());
     }
 }
예제 #2
0
 /// <summary>
 /// 서버 로그창에 로그 쓰기 및 로그파일에 쓰기
 /// </summary>
 /// <param name="svrLog"></param>
 public void logWriter(string Log)
 {
     try
     {
         Log += "( " + DateTime.Now.ToString() + ")" + "\r\n";
         if (this.InvokeRequired)
         {
             LogDele dele = new LogDele(logFileWrite);
             Invoke(dele, Log);
             if (CanFileWrite == true)
             {
                 logFileWrite(Log);
             }
         }
         else
         {
             if (CanFileWrite == true)
             {
                 logFileWrite(Log);
             }
         }
     }
     catch (Exception exception)
     {
         logWriter(exception.ToString());
     }
 }
예제 #3
0
파일: Form1.cs 프로젝트: WeDoCrm/misc
 /// <summary>
 /// 로그파일 생성 및 쓰기
 /// </summary>
 /// <param name="_log"></param>
 public void logFileWrite(string _log)
 {
     try
     {
         if (!di.Exists)
         {
             FolderCheck();
         }
         try
         {
             sw = new StreamWriter(Application.StartupPath + "\\LicenseManager_" + DateTime.Now.ToShortDateString() + ".log", true);
             sw.WriteLine(_log);
             sw.Close();
         }
         catch (Exception e)
         {
             if (this.InvokeRequired)
             {
                 LogDele dele = new LogDele(logFileWrite);
                 Invoke(dele, "logFileWriter() 에러 : " + e.ToString());
             }
             else logWriter("logFileWriter() 에러 : " + e.ToString());
         }
     }
     catch (Exception exception)
     {
         logWriter(exception.ToString());
     }
 }
예제 #4
0
파일: Form1.cs 프로젝트: WeDoCrm/misc
 /// <summary>
 /// 서버 로그창에 로그 쓰기 및 로그파일에 쓰기
 /// </summary>
 /// <param name="svrLog"></param>
 public void logWriter(string Log)
 {
     try
     {
         Log += "( " + DateTime.Now.ToString() + ")" + "\r\n";
         if (this.InvokeRequired)
         {
             LogDele dele = new LogDele(logFileWrite);
             Invoke(dele, Log);
             if (CanFileWrite == true)
                 logFileWrite(Log);
         }
         else
         {
             if (CanFileWrite == true) logFileWrite(Log);
         }
     }
     catch (Exception exception)
     {
         logWriter(exception.ToString());
     }
 }