Exemple #1
0
 public static void LogInfo(string description)
 {
     FileTools.AppendTextToFile(LogPath, $"[{DateTime.Now}][INFO]: {description}");
 }
Exemple #2
0
 public static void LogWarning(string description)
 {
     FileTools.AppendTextToFile(LogPath, $"[{DateTime.Now}][WARNING]: {description}");
 }
Exemple #3
0
 /// <summary>
 /// Helper function for logging errors to text file.
 /// This can be refactored to support logging to database or something else.
 /// Ultimately 3rd party nuget would be used.
 /// </summary>
 /// <param name="description"></param>
 public static void LogError(string description)
 {
     FileTools.AppendTextToFile(LogPath, $"[{DateTime.Now}][ERROR]: {description}");
 }