diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-02 21:36:04 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-02 21:36:04 -0400 |
commit | c9c354a66f3659bda9f1c8915ab61bc1a38412ef (patch) | |
tree | 3fc7ff24043ee54c8f9b5a451320617abf0ba40d /src/StardewModdingAPI | |
parent | 6a628a4d8a21b98a55ff29065980fc818d4f39dc (diff) | |
download | SMAPI-c9c354a66f3659bda9f1c8915ab61bc1a38412ef.tar.gz SMAPI-c9c354a66f3659bda9f1c8915ab61bc1a38412ef.tar.bz2 SMAPI-c9c354a66f3659bda9f1c8915ab61bc1a38412ef.zip |
slim down console output for players some more
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r-- | src/StardewModdingAPI/Framework/Monitor.cs | 9 | ||||
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Framework/Monitor.cs b/src/StardewModdingAPI/Framework/Monitor.cs index b64b3b0b..7d40b72b 100644 --- a/src/StardewModdingAPI/Framework/Monitor.cs +++ b/src/StardewModdingAPI/Framework/Monitor.cs @@ -95,6 +95,15 @@ namespace StardewModdingAPI.Framework this.ExitTokenSource.Cancel(); } + /// <summary>Write a newline to the console and log file.</summary> + internal void Newline() + { + if (this.WriteToConsole) + this.ConsoleManager.ExclusiveWriteWithoutInterception(Console.WriteLine); + if (this.WriteToFile) + this.LogFile.WriteLine(""); + } + /// <summary>Log a message for the player or developer, using the specified console color.</summary> /// <param name="source">The name of the mod logging the message.</param> /// <param name="message">The message to log.</param> diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 6a240a7b..e960a684 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -126,7 +126,6 @@ namespace StardewModdingAPI // init logging this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GetGameDisplayVersion(Constants.GameVersion)} on {this.GetFriendlyPlatformName()}", LogLevel.Info); this.Monitor.Log($"Mods go here: {Constants.ModPath}"); - this.Monitor.Log("Starting SMAPI..."); // validate paths this.VerifyPath(Constants.ModPath); @@ -210,7 +209,7 @@ namespace StardewModdingAPI } // start game - this.Monitor.Log("Starting game..."); + this.Monitor.Log("Starting game...", LogLevel.Trace); try { this.IsGameRunning = true; @@ -685,6 +684,7 @@ namespace StardewModdingAPI IModMetadata[] loadedMods = this.ModRegistry.GetMods().ToArray(); // log skipped mods + this.Monitor.Newline(); if (skippedMods.Any()) { this.Monitor.Log($"Skipped {skippedMods.Count} mods:", LogLevel.Error); @@ -695,6 +695,7 @@ namespace StardewModdingAPI this.Monitor.Log($" {mod.DisplayName} {mod.Manifest.Version} because {reason}", LogLevel.Error); } + this.Monitor.Newline(); } // log loaded mods @@ -709,6 +710,7 @@ namespace StardewModdingAPI LogLevel.Info ); } + this.Monitor.Newline(); // initialise translations this.ReloadTranslations(); |