summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Logger.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Logger.cs')
-rw-r--r--src/StardewModdingAPI/Logger.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Logger.cs b/src/StardewModdingAPI/Logger.cs
index 0d69b6ec..32da124f 100644
--- a/src/StardewModdingAPI/Logger.cs
+++ b/src/StardewModdingAPI/Logger.cs
@@ -30,7 +30,7 @@ namespace StardewModdingAPI
public static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Console.WriteLine("An exception has been caught");
- File.WriteAllText(Constants.LogDir + "\\MODDED_ErrorLog.Log_" + DateTime.UtcNow.Ticks + ".txt", e.ExceptionObject.ToString());
+ File.WriteAllText(Path.Combine(Constants.LogDir, $"MODDED_ErrorLog.Log_{DateTime.UtcNow.Ticks}.txt"), e.ExceptionObject.ToString());
}
/// <summary>
@@ -40,7 +40,7 @@ namespace StardewModdingAPI
public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
{
Console.WriteLine("A thread exception has been caught");
- File.WriteAllText(Constants.LogDir + "\\MODDED_ErrorLog.Log_" + Extensions.Random.Next(100000000, 999999999) + ".txt", e.Exception.ToString());
+ File.WriteAllText(Path.Combine(Constants.LogDir, $"MODDED_ErrorLog.Log_{Extensions.Random.Next(100000000, 999999999)}.txt"), e.Exception.ToString());
}
#endregion