From a9958dac6acd23213649456fe4763f54d2672bcb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 27 Jun 2017 11:22:36 -0400 Subject: clean up log output when loading mods --- src/StardewModdingAPI/Program.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/StardewModdingAPI') diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 0805b6c5..f313a9ac 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -668,10 +668,16 @@ namespace StardewModdingAPI } // log mods + this.Monitor.Log($"Loaded {modsLoaded} mods" + (modsLoaded > 0 ? ":" : "."), LogLevel.Info); foreach (var metadata in this.ModRegistry.GetMods().OrderBy(p => p.DisplayName)) { IManifest manifest = metadata.Manifest; - this.Monitor.Log($"Loaded {metadata.DisplayName} by {manifest.Author}, v{manifest.Version} | {manifest.Description}", LogLevel.Info); + this.Monitor.Log( + $" {metadata.DisplayName} {manifest.Version}" + + (!string.IsNullOrWhiteSpace(manifest.Author) ? $" by {manifest.Author}" : "") + + (!string.IsNullOrWhiteSpace(manifest.Description) ? $" | {manifest.Description}" : ""), + LogLevel.Info + ); } // initialise translations @@ -699,7 +705,6 @@ namespace StardewModdingAPI } // print result - this.Monitor.Log($"Loaded {modsLoaded} mods."); return modsLoaded; } -- cgit