summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Log.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-11-04 18:24:10 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-11-04 18:24:10 -0400
commit78e8a6a4a088d6bff017bfcf22007f9fc8950071 (patch)
treeb6d73a4de283af75ff46fae70c0bc177792f007a /src/StardewModdingAPI/Log.cs
parentab3fffde0a96275026c7056369f58100c4b42a83 (diff)
downloadSMAPI-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.cs6
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