diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-12-20 22:35:58 -0500 |
commit | 77002d3e9965d9afa843a95129c6acb5d1c4a283 (patch) | |
tree | b4f4a338945cd3f2cc5881e46fb0dd2b075a79ce /src/SMAPI/Framework/Logging | |
parent | 1c70736c00e6e70f46f539cb26b5fd253f4eff3b (diff) | |
parent | 5e2f6f565d6ef5330ea2e8c6a5e796f937289255 (diff) | |
download | SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.gz SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.tar.bz2 SMAPI-77002d3e9965d9afa843a95129c6acb5d1c4a283.zip |
Merge branch 'stardew-valley-1.5' into develop
# Conflicts:
# docs/release-notes.md
Diffstat (limited to 'src/SMAPI/Framework/Logging')
-rw-r--r-- | src/SMAPI/Framework/Logging/LogManager.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs index 1e484709..ee013a85 100644 --- a/src/SMAPI/Framework/Logging/LogManager.cs +++ b/src/SMAPI/Framework/Logging/LogManager.cs @@ -32,10 +32,10 @@ namespace StardewModdingAPI.Framework.Logging private readonly Regex[] SuppressConsolePatterns = { new Regex(@"^TextBox\.Selected is now '(?:True|False)'\.$", RegexOptions.Compiled | RegexOptions.CultureInvariant), - new Regex(@"^(?:FRUIT )?TREE: IsClient:(?:True|False) randomOutput: \d+$", RegexOptions.Compiled | RegexOptions.CultureInvariant), new Regex(@"^loadPreferences\(\); begin", RegexOptions.Compiled | RegexOptions.CultureInvariant), new Regex(@"^savePreferences\(\); async=", RegexOptions.Compiled | RegexOptions.CultureInvariant), - new Regex(@"^DebugOutput:\s+(?:added CLOUD|added cricket|dismount tile|Ping|playerPos)", RegexOptions.Compiled | RegexOptions.CultureInvariant) + new Regex(@"^DebugOutput:\s+(?:added cricket|dismount tile|Ping|playerPos)", RegexOptions.Compiled | RegexOptions.CultureInvariant), + new Regex(@"^Ignoring keys: ", RegexOptions.Compiled | RegexOptions.CultureInvariant) }; /// <summary>Regex patterns which match console messages to show a more friendly error for.</summary> @@ -84,10 +84,11 @@ namespace StardewModdingAPI.Framework.Logging /// <param name="writeToConsole">Whether to output log messages to the console.</param> /// <param name="isVerbose">Whether verbose logging is enabled. This enables more detailed diagnostic messages than are normally needed.</param> /// <param name="isDeveloperMode">Whether to enable full console output for developers.</param> - public LogManager(string logPath, ColorSchemeConfig colorConfig, bool writeToConsole, bool isVerbose, bool isDeveloperMode) + /// <param name="getScreenIdForLog">Get the screen ID that should be logged to distinguish between players in split-screen mode, if any.</param> + public LogManager(string logPath, ColorSchemeConfig colorConfig, bool writeToConsole, bool isVerbose, bool isDeveloperMode, Func<int?> getScreenIdForLog) { // init construction logic - this.GetMonitorImpl = name => new Monitor(name, this.IgnoreChar, this.LogFile, colorConfig, isVerbose) + this.GetMonitorImpl = name => new Monitor(name, this.IgnoreChar, this.LogFile, colorConfig, isVerbose, getScreenIdForLog) { WriteToConsole = writeToConsole, ShowTraceInConsole = isDeveloperMode, |