summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Logging
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-08 18:03:14 -0400
committerGitHub <noreply@github.com>2022-10-08 18:03:14 -0400
commit2e918823ba7771e45d78a8efb68aa5ea381e8e78 (patch)
tree34176b52321e9c6725ed89bed7263ccfd1f388b0 /src/SMAPI/Framework/Logging
parenta7f03abe25128dba78d8c22802370a3f9a8aff11 (diff)
parent2e0bc5ddfe90102fe5adbc90b2d53c5cbb8405fe (diff)
downloadSMAPI-2e918823ba7771e45d78a8efb68aa5ea381e8e78.tar.gz
SMAPI-2e918823ba7771e45d78a8efb68aa5ea381e8e78.tar.bz2
SMAPI-2e918823ba7771e45d78a8efb68aa5ea381e8e78.zip
Merge pull request #870 from atravita-mods/arraypooling
Use array pooling and various optimizations to reduce allocations
Diffstat (limited to 'src/SMAPI/Framework/Logging')
-rw-r--r--src/SMAPI/Framework/Logging/LogOnceCacheKey.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/Logging/LogOnceCacheKey.cs b/src/SMAPI/Framework/Logging/LogOnceCacheKey.cs
new file mode 100644
index 00000000..4d31ffeb
--- /dev/null
+++ b/src/SMAPI/Framework/Logging/LogOnceCacheKey.cs
@@ -0,0 +1,10 @@
+using System.Diagnostics.CodeAnalysis;
+
+namespace StardewModdingAPI.Framework.Logging
+{
+ /// <summary>The cache key for the <see cref="Monitor.LogOnceCache"/>.</summary>
+ /// <param name="Message">The log message.</param>
+ /// <param name="Level">The log level.</param>
+ [SuppressMessage("ReSharper", "NotAccessedPositionalProperty.Local", Justification = "This is only used as a lookup key.")]
+ internal readonly record struct LogOnceCacheKey(string Message, LogLevel Level);
+}