summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-21 17:58:17 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-21 17:58:17 -0400
commitbf3ed26a8b6480a12c7e62f483234d8c616fae28 (patch)
tree8df10409d2543d983d81d0f1502c1f9b2c72bb1f /src/StardewModdingAPI/Framework
parent9e7c77f1f4bb9bc244a8227d932a28999b022471 (diff)
downloadSMAPI-bf3ed26a8b6480a12c7e62f483234d8c616fae28.tar.gz
SMAPI-bf3ed26a8b6480a12c7e62f483234d8c616fae28.tar.bz2
SMAPI-bf3ed26a8b6480a12c7e62f483234d8c616fae28.zip
fix smapi-crash.txt being copied from default log even if --log-path is specified
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r--src/StardewModdingAPI/Framework/Logging/LogFileManager.cs11
1 files changed, 10 insertions, 1 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);