diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-04 18:24:10 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-04 18:24:10 -0400 |
commit | 78e8a6a4a088d6bff017bfcf22007f9fc8950071 (patch) | |
tree | b6d73a4de283af75ff46fae70c0bc177792f007a /src/StardewModdingAPI/Log.cs | |
parent | ab3fffde0a96275026c7056369f58100c4b42a83 (diff) | |
download | SMAPI-78e8a6a4a088d6bff017bfcf22007f9fc8950071.tar.gz SMAPI-78e8a6a4a088d6bff017bfcf22007f9fc8950071.tar.bz2 SMAPI-78e8a6a4a088d6bff017bfcf22007f9fc8950071.zip |
remove extensions from public interface, refactor & document
Diffstat (limited to 'src/StardewModdingAPI/Log.cs')
-rw-r--r-- | src/StardewModdingAPI/Log.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Log.cs b/src/StardewModdingAPI/Log.cs index 15c4ce55..abf6e36a 100644 --- a/src/StardewModdingAPI/Log.cs +++ b/src/StardewModdingAPI/Log.cs @@ -7,6 +7,9 @@ namespace StardewModdingAPI { public static class Log { + /// <summary>A pseudorandom number generator used to generate log files.</summary> + private static readonly Random Random = new Random(); + private static readonly LogWriter _writer; static Log() @@ -38,9 +41,8 @@ namespace StardewModdingAPI public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { Console.WriteLine("A thread exception has been caught"); - File.WriteAllText(Path.Combine(Constants.LogDir, $"MODDED_ErrorLog.Log_{Extensions.Random.Next(100000000, 999999999)}.txt"), e.Exception.ToString()); + File.WriteAllText(Path.Combine(Constants.LogDir, $"MODDED_ErrorLog.Log_{Log.Random.Next(100000000, 999999999)}.txt"), e.Exception.ToString()); } - #endregion #region Sync Logging |