Beispiel #1
0
 /// <summary>
 /// Saves to the log file.
 /// </summary>
 /// <param name="logItem">The log item.</param>
 private static void SaveToFile(LogItem logItem)
 {
     try
     {
         File.AppendAllText(LogPath, logItem.GetLoggingString());
     }
     catch
     {
         Console.WriteLine(@"[DZAwareness] >>> Exception: Cannot Write To Logs File.");
     }
 }
Beispiel #2
0
 /// <summary>
 /// Adds an item to the log.
 /// </summary>
 /// <param name="logItem">The log item.</param>
 public static void AddToLog(LogItem logItem)
 {
     CreateDirectory();
     logItems.Add(logItem);
     SaveToFile(logItem);
 }
Beispiel #3
0
 /// <summary>
 /// Adds an item to the log.
 /// </summary>
 /// <param name="logItem">The log item.</param>
 public static void AddToLog(LogItem logItem)
 {
     CreateDirectory();
     logItems.Add(logItem);
     SaveToFile(logItem);
 }