Skip to content

Commit

Permalink
Update Logger.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob-Eichberger committed Nov 9, 2021
1 parent 5171771 commit e5031bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Helper/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void Log(string message = "", Exception exception = null!, [Caller
string path = Directory.GetCurrentDirectory() + @"\Log";
Directory.CreateDirectory(path);
path += $@"\{DateTime.UtcNow.Date:dd-MM-yyyy}.txt";
File.AppendAllText(path, $"ERROR in function '{functionName ?? " - "}' ({DateTime.UtcNow:dd.MM.yyyy HH:mm:ss}): '{message}'\n\n Exception: {exception.ToString() ?? "-"} \n\n StackTrace: {exception.StackTrace ?? "-"}\n\n------------------------------------------------------------------------------------------------\n");
File.AppendAllText(path, $"ERROR in function '{functionName ?? " - "}' ({DateTime.UtcNow:dd.MM.yyyy HH:mm:ss}): '{message}'\n\n Exception: {exception} \n\n------------------------------------------------------------------------------------------------\n");
}
}
}

0 comments on commit e5031bb

Please sign in to comment.