Adds the obj data with the propertyName to the log information of all logs that happen within a using statement.
In this C# example any loggers within the MethodThatLogs() method will have the PushProperty "User".
Examples
using (var pushLogger = _logger.LogContextPushProperty("User", user)) { MethodThatLogs(); }
Namespace: Relativity.Kepler.Logging
Assembly: Relativity.Kepler (in Relativity.Kepler.dll) Version: local build
Syntax
C#
IDisposable LogContextPushProperty( string propertyName, Object obj )
Parameters
- propertyName
- Type: System.String
The property name to display in the log. - obj
- Type: System.Object
The object to deserialize and add to the log.
Return Value
Type: IDisposable[Missing <returns> documentation for "M:Relativity.Kepler.Logging.IPerformanceLog.LogContextPushProperty(System.String,System.Object)"]
See Also