Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Mar 13, 2023
1 parent 0ef44a0 commit e9ec8f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ public static class Logger
public static void WriteLine(string logMessage)
{
Debug.WriteLine(logMessage);

var appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper";
var logFile = appPath + "\\log.txt";

if (!Directory.Exists(appPath)) Directory.CreateDirectory(appPath);

using (StreamWriter w = File.AppendText(logFile))
{
Debug.WriteLine(logMessage);
w.WriteLine($"{DateTime.Now}: {logMessage}");
}

Expand Down

0 comments on commit e9ec8f0

Please sign in to comment.