diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-11-09 18:52:24 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-11-09 18:52:24 -0500 |
commit | 10773c088a475cd7adee45caaf598459669337e8 (patch) | |
tree | e4b4d401a20639ab66b0408c52f99ad28097789b /src/SMAPI/Framework/SCore.cs | |
parent | 9560baeb71ca17c8b86b3674daddd13765ba0f24 (diff) | |
download | SMAPI-10773c088a475cd7adee45caaf598459669337e8.tar.gz SMAPI-10773c088a475cd7adee45caaf598459669337e8.tar.bz2 SMAPI-10773c088a475cd7adee45caaf598459669337e8.zip |
fix console output during early game init not being logged
This doesn't affect any current output, it only affects test code.
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 7e5b6e02..890058b0 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -136,6 +136,10 @@ namespace StardewModdingAPI.Framework this.EventManager = new EventManager(this.Monitor, this.ModRegistry); this.DeprecationManager = new DeprecationManager(this.Monitor, this.ModRegistry); + // redirect direct console output + if (this.MonitorForGame.WriteToConsole) + this.ConsoleManager.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message); + // inject deprecation managers SemanticVersion.DeprecationManager = this.DeprecationManager; @@ -344,10 +348,6 @@ namespace StardewModdingAPI.Framework /// <summary>Initialise SMAPI and mods after the game starts.</summary> private void InitialiseAfterGameStart() { - // redirect direct console output - if (this.MonitorForGame.WriteToConsole) - this.ConsoleManager.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message); - // add headers if (this.Settings.DeveloperMode) this.Monitor.Log($"You configured SMAPI to run in developer mode. The console may be much more verbose. You can disable developer mode by installing the non-developer version of SMAPI, or by editing {Constants.ApiConfigPath}.", LogLevel.Info); |