コード例 #1
0
 public static void TryWriteLogObject(this object obj, ILogFileManager logFileManager, IClientFeatures clientFeatures, LogType logType = LogType.Info, bool indented = true)
 {
     try
     {
         logFileManager.WriteText(obj.BuildLogObject(clientFeatures).Stringify(indented) + "\n");
     }
     catch (Exception ex)
     {
         try
         {
             logFileManager.WriteText(ex.BuildLogObject(clientFeatures).Stringify(indented) + "\n");
         }
         catch
         {
         }
     }
 }
コード例 #2
0
 protected void WriteObjectInLog(object obj)
 {
     _logFileManager.WriteText(Stringify(BuildObject(obj), true) + "\n");
 }