Class LogSnapshotOptions
- Namespace
- LogAssertions.Render
- Assembly
- LogAssertions.dll
Controls how Render(FakeLogCollector, LogSnapshotOptions?)
formats each captured log record. Construct with an object initializer, or take
Default and with-mutate only the knobs you care about.
public sealed record LogSnapshotOptions : IEquatable<LogSnapshotOptions>
- Inheritance
-
LogSnapshotOptions
- Implements
- Inherited Members
Remarks
Every property defaults to the value that produces the most compact, most deterministic rendering. The default rendering is fully stable run-to-run and cross-platform; only Full introduces run-to-run volatility (a stack trace), and that choice is opt-in.
Properties
CategoryStyle
How the logger category is rendered in each record's header line. Default LeafOnly.
public CategoryStyle CategoryStyle { get; init; }
Property Value
Default
The default options: abbreviation level, leaf-only category, scopes included, type-and-message exceptions. Fully deterministic and cross-platform stable.
public static LogSnapshotOptions Default { get; }
Property Value
ExceptionStyle
How an exception attached to a record is rendered. Default TypeAndMessage.
public ExceptionStyle ExceptionStyle { get; init; }
Property Value
LevelStyle
How the log level is rendered in each record's header line. Default Abbreviation.
public LogLevelStyle LevelStyle { get; init; }
Property Value
ScopeStyle
Whether a record's active logging scopes are rendered. Default Include.
public ScopeStyle ScopeStyle { get; init; }