ForContext
method and bound to returned log instance. The dominant use case for source context is to obtain class-based logs:ForContext
calls produce logs with multiple contexts ordered with respect to calls sequence.SourceContext
property. Its value is represented by public SourceContextValue type that implements IReadOnlyList<string>
and has a pretty ToString
. This behavior can be replicated in custom log implementations by returning a SourceContextWrapper from ForContext
method.