Serilog integration
Last updated
Last updated
Location: module.
SerilogLog
is an adapter that wraps an arbitrary instance of Serilog's ILogger
and implements Vostok . It enables gradual migration for Serilog users by allowing existing code to be ported to Vostok ILog
abstraction without immediately changing and reconfiguring underlying implementation.
It preserves message templates in their original form as Serilog's templating syntax is a superset of Vostok capabilites. Properties are also passed as-is, bound by provided Serilog logger instance.
ForContext
method works exactly like it does in native : it causes returned log instances to enrich incoming log events with SourceContext
property containing a hierarchical context value. See section for more details.
VostokSink
is an implementation of Serilog's ILogEventSink
interface based on an arbitrary Vostok ILog
instance.