<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />

Newtonsoft.Json.Serialization.MemoryTraceWriter

Represents a trace writer that writes to memory. When the trace message limit is reached then old trace messages will be removed as new messages are added.
namespace Newtonsoft.Json.Serialization { public class MemoryTraceWriter : ITraceWriter { public TraceLevel LevelFilter { get; set; } public MemoryTraceWriter(); public void Trace(TraceLevel level, string message, Exception ex); public IEnumerable<string> GetTraceMessages(); } }