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

DiagnosticsTraceWriter

Represents a trace writer that writes to the application's TraceListener instances.
public TraceLevel LevelFilter { get; set; }

Gets the TraceLevel that will be used to filter the trace messages passed to the writer. For example a filter level of Info will exclude Verbose messages and include Info, Warning and Error messages.

public void Trace(TraceLevel level, string message, Exception ex)

Writes the specified trace level, message and optional exception.