There is a need for contexts that are associated with different scopes. The context can be used to attach arbitrary data, and use this data in sinks, format providers or condition expressions.
There will be three scopes available.
Thread
Global
Local (log entry specific)
// Example code
logger.Contexts.Thread.Set("CustomerId", customer.Id);
logger.Contexts.Global.Set("UseEncryption", true);
There is a need for contexts that are associated with different scopes. The context can be used to attach arbitrary data, and use this data in sinks, format providers or condition expressions.
There will be three scopes available.