summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Framework/Logging/LogFileManager.cs11
-rw-r--r--src/StardewModdingAPI/Program.cs2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Framework/Logging/LogFileManager.cs b/src/StardewModdingAPI/Framework/Logging/LogFileManager.cs
index 1f6ade1d..8cfe0527 100644
--- a/src/StardewModdingAPI/Framework/Logging/LogFileManager.cs
+++ b/src/StardewModdingAPI/Framework/Logging/LogFileManager.cs
@@ -14,14 +14,23 @@ namespace StardewModdingAPI.Framework.Logging
/*********
+ ** Accessors
+ *********/
+ /// <summary>The full path to the log file being written.</summary>
+ public string Path { get; }
+
+
+ /*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="path">The log file to write.</param>
public LogFileManager(string path)
{
+ this.Path = path;
+
// create log directory if needed
- string logDir = Path.GetDirectoryName(path);
+ string logDir = System.IO.Path.GetDirectoryName(path);
if (logDir == null)
throw new ArgumentException($"The log path '{path}' is not valid.");
Directory.CreateDirectory(logDir);
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 4df63456..4a4b2ca7 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -160,7 +160,7 @@ namespace StardewModdingAPI
try
{
File.WriteAllText(Constants.FatalCrashMarker, string.Empty);
- File.Copy(Constants.DefaultLogPath, Constants.FatalCrashLog, overwrite: true);
+ File.Copy(this.LogFile.Path, Constants.FatalCrashLog, overwrite: true);
}
catch (Exception ex)
{