LogRecordBuilder Methods |
The LogRecordBuilder type exposes the following members.
Name | Description | |
---|---|---|
BeginCustomRecord |
Initializes the current LogRecordBuilder to emit a custom record.
| |
BeginRecord |
Initializes the current LogRecordBuilder to emit a standard (i.e. non-custom) record for
a given context and method.
| |
BeginWriteItem |
Begins to build a specified item.
| |
Complete |
Emits the record and resets the current LogRecordBuilder.
This method invoked after all SetThis<T>(T), SetParameter<T>(Int32, String, ParameterKind, String, T) and
similar methods have been called.
| |
Dispose |
Finishes the logging of the current record. Calling this method does not actually make
the current LogRecordBuilder unusable, but it makes it usable for a
next record in the same thread.
| |
EmitRecord |
Emits the record. Invoked by the Complete() method.
| |
EndWriteItem |
Ends building a specified item.
| |
ForEachProperty(LoggingPropertyVisitor<Object>) | Obsolete.
Invokes a delegate for each property defined in the current log record.
| |
ForEachProperty<T>(LoggingPropertyVisitor<T>, T) |
Invokes a delegate for each property defined in the current log record.
| |
GetOutputMultiplexEventData |
Returns a list of properties that will be passed to the next backend in order if a multiplexer is used. See Remarks.
| |
Reset |
Resets all fields and properties of the current LogRecordBuilder to their initial value. Invoked by the
Complete() method.
| |
SetException |
Sets the exception for the method or activity.
| |
SetExecutionTime |
Sets the method or activity execution time.
| |
SetMethodGenericParameter<T> |
Not implemented.
| |
SetParameter<T>(Int32, String, ParameterKind, String, T) |
Sets the value of a given parameter and uses the default formatter.
| |
SetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>) |
Sets the value of a given parameter and specifies the Formatter<T>.
| |
SetReturnValue<T>(Int32, String, String, T) |
Sets a given return value (there can be several return values in C# 7.0) and uses the default formatter.
| |
SetReturnValue<T>(Int32, String, String, T, IFormatter<T>) |
Sets a given return value (there can be several return values in C# 7.0) and uses a given formatter.
| |
SetThis<T>(T) |
Sets the this (instance) value and uses the default formatter. This method is only invoked if the IncludeThisValue property is true.
| |
SetThis<T>(T, IFormatter<T>) |
Sets the this (instance) value and uses a given formatter.
| |
SetTypeGenericParameter<T> |
Not implemented.
| |
VisitProperties(Action<String, Object>, LoggingPropertyVisitorOptions) |
Invokes a delegate each property on the current log record.
This offers a simple way to visit properties, but it has a performance overhead compared to VisitProperties<TState>(ILoggingPropertyVisitor<TState>, TState, LoggingPropertyVisitorOptions)
because it is weakly typed and cause the allocation of a closure class to build the action. It also does not expose the LoggingPropertyOptions.
| |
VisitProperties<TState>(ILoggingPropertyVisitor<TState>, TState, LoggingPropertyVisitorOptions) |
Invokes the Visit<TValue>(String, TValue, LoggingPropertyOptions, TState) method
of an interface implementation for each property on the current record, but not in the context stack.
| |
WriteCustomParameter<T>(Int32, ArraySegment<Char>, T) |
Writes a custom parameter (passed as an ArraySegment<char>) and uses the default formatter.
| |
WriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions) |
Writes a custom parameter (passed as an CharSpan) and uses the default formatter.
| |
WriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>) |
Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.
| |
WriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>) |
Writes a custom parameter (passed as an CharSpan) and uses a given formatter.
| |
WriteCustomString(ArraySegment<Char>) |
Write a custom string passed as an ArraySegment<char>.
| |
WriteCustomString(CharSpan) |
Write a custom string passed as an CharSpan.
|