diff options
author | Zoryn Aaron <zoryn4163@gmail.com> | 2016-03-28 22:13:59 -0400 |
---|---|---|
committer | Zoryn Aaron <zoryn4163@gmail.com> | 2016-03-28 22:13:59 -0400 |
commit | 91c156678c0b694160f5461245968c9b4a0cd4f1 (patch) | |
tree | 11294f6aa65d7b3ce61acccae6ce8fc97a78be32 | |
parent | 2175ec4953bb1de06bf74c0ecff3c355dc877e43 (diff) | |
parent | 26b914d61deb1c95aa306576cc8cd007593db80d (diff) | |
download | SMAPI-91c156678c0b694160f5461245968c9b4a0cd4f1.tar.gz SMAPI-91c156678c0b694160f5461245968c9b4a0cd4f1.tar.bz2 SMAPI-91c156678c0b694160f5461245968c9b4a0cd4f1.zip |
Merge branch 'master' of https://github.com/ClxS/SMAPI
-rw-r--r-- | StardewModdingAPI/Logger.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/StardewModdingAPI/Logger.cs b/StardewModdingAPI/Logger.cs index 8a2241da..0d69b6ec 100644 --- a/StardewModdingAPI/Logger.cs +++ b/StardewModdingAPI/Logger.cs @@ -231,6 +231,13 @@ namespace StardewModdingAPI // ReSharper disable once InconsistentlySynchronizedField _logQueue = new ConcurrentQueue<LogInfo>(); Console.WriteLine(Constants.LogPath); + + // If the ErrorLogs dir doesn't exist StreamWriter will throw an exception. + if (!Directory.Exists(Constants.LogDir)) + { + Directory.CreateDirectory(Constants.LogDir); + } + _stream = new StreamWriter(Constants.LogPath, false); Console.WriteLine("Created log instance"); } |