예제 #1
0
파일: Log.cs 프로젝트: e-Deniska/easyMoney
 /// <summary>
 /// Write entry to log
 /// </summary>
 /// <param name="message">Message to log</param>
 /// <param name="obj">Object to describe</param>
 public static void Write(String message, object obj)
 {
     lock (fileLock)
     {
         openLog();
         writeLog(message);
         try
         {
             ObjectDescriptor descriptor = new ObjectDescriptor(logWriter);
             descriptor.Describe(obj);
         }
         catch (Exception e)
         {
             writeLog(LogError);
             writeLog(describeException(e));
         }
         closeLog();
     }
 }