Log4NetLogRecordBuilder Methods |
The Log4NetLogRecordBuilder type exposes the following members.
Name | Description | |
---|---|---|
AddHiddenCustomParameter<T> |
Method invoked by WriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>) when for parameter mode is Hidden.
The default implementation does not do anything.
(Inherited from TextLogRecordBuilder.) | |
AppendAsyncInfo |
Appends information about the async method to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendClosingParenthesisConditional |
Appends a closing parenthesis to the current StringBuilder if required.
(Inherited from TextLogRecordBuilder.) | |
AppendComma |
Appends a command and a space to the current StringBuilder, and resets the required punctuation set by RequireComma() or RequirePunctuation(Char).
(Inherited from TextLogRecordBuilder.) | |
AppendCommaConditional |
Appends a comma to the current StringBuilder, unless this method is invoked for the first
time for the current record.
(Inherited from TextLogRecordBuilder.) | |
AppendContextDescription() |
Appends the context Description
(or the TypeSource name, if the type of the context is not equal to the source type of the record)
to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendContextDescription(LoggingContext) |
Appends the context Description to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendDelimiter |
Appends a Delimiter to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendDelimiterConditional |
Appends a Delimiter to the current StringBuilder
if the RequireDelimiter() method has been called previously.
(Inherited from TextLogRecordBuilder.) | |
AppendEpilogue |
Appends the final part of log message to StringBuilder.
This includes state machine number and execution time where relevant,
but does not include exception details.
(Inherited from TextLogRecordBuilder.) | |
AppendExceptionDetails |
Appends exception details to StringBuilder if IncludeExceptionDetails is set.
(Inherited from TextLogRecordBuilder.) | |
AppendExecutionTime |
Appends the execution time to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendExecutionTimeThreshold |
Appends the execution time threshold to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendIndentString |
Appends indentation for the given to StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendMemberName |
Appends name of the member for the current record
(including the declaring type name, subject to the IncludeType property) to
the current StringBuilder, as well as an opening parenthesis.
(Inherited from TextLogRecordBuilder.) | |
AppendOpeningParenthesis |
Appends an opening parenthesis to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendProlog |
Appends the indent string, context description, and the record kind to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendRecordKind |
Appends the LogRecordKind of the current record to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendSemanticParameter(SemanticParameterKind, String, String, String, Int32) |
Appends a parameter of String type to the current StringBuilder. Back-ends that
support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendSemanticParameter(SemanticParameterKind, String, Object, IFormatter, String, Int32) |
Appends a parameter to the current StringBuilder, where the name is given as a String, and uses a specific formatter. Back-ends that
support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder. This method overload is weakly typed.
(Inherited from TextLogRecordBuilder.) | |
AppendSemanticParameter<T>(SemanticParameterKind, ArraySegment<Char>, T, IFormatter<T>, String, Int32) |
Appends a parameter to the current StringBuilder, where the name is given as a ArraySegment<T>, and uses a specific formatter. Back-ends that
support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendSemanticParameter<T>(SemanticParameterKind, String, T, IFormatter<T>, String, Int32) |
Appends a parameter to the current StringBuilder, where the name is given as a String, and uses a specific formatter. Back-ends that
support semantic logging may store the parameter value semantically instead of appending it to the StringBuilder. This method overload is strongly typed.
(Inherited from TextLogRecordBuilder.) | |
AppendSourceLineInfo |
Appends source (file, line) information to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendSpaces |
Appends a given number of spaces to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendSpecialChar |
Appends a special Char (which may require escaping with specific back-ends) to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
AppendTrailingPeriod |
Appends a trailing period (.) to the current StringBuilder, respecting the AppendTrailingPeriod property.
(Inherited from TextLogRecordBuilder.) | |
AppendTypeName |
Appends the name of the TypeSource to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
BeginCustomRecord |
Initializes the current LogRecordBuilder to emit a custom record.
(Inherited from TextLogRecordBuilder.) | |
BeginRecord |
Initializes the current LogRecordBuilder to emit a standard (i.e. non-custom) record for
a given context and method.
(Inherited from TextLogRecordBuilder.) | |
BeginWriteItem |
Begins to build a specified item.
(Inherited from TextLogRecordBuilder.) | |
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.
(Inherited from LogRecordBuilder.) | |
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.
(Inherited from TextLogRecordBuilder.) | |
EmitRecord() |
Emits the record. Invoked by the Complete() method.
(Inherited from TextLogRecordBuilder.) | |
EmitRecord(Boolean) |
Emits the record and specifies whether exception details should be appended to the text.
(Inherited from TextLogRecordBuilder.) | |
EndContextDescription |
Ends building the context Description and starts building the action text.
(Inherited from TextLogRecordBuilder.) | |
EndContextDescriptionConditional |
Switches between building the context Description and the action text.
If the EndContextDescriptionConditional() method has been previously invoked, subsequent calls
are ignored.
(Inherited from TextLogRecordBuilder.) | |
EndWriteItem |
Ends building a specified item.
(Inherited from TextLogRecordBuilder.) | |
ForEachProperty(LoggingPropertyVisitor<Object>) | Obsolete.
Invokes a delegate for each property defined in the current log record.
(Inherited from LogRecordBuilder.) | |
ForEachProperty<T>(LoggingPropertyVisitor<T>, T) |
Invokes a delegate for each property defined in the current log record.
(Inherited from LogRecordBuilder.) | |
GetContextDescription | Obsolete.
Gets the context Description
or the TypeSource name, if the type of the context is not equal to the source type of the record.
(Inherited from TextLogRecordBuilder.) | |
GetContextDescriptionUnsafe | Obsolete.
Gets an UnsafeString representing the context Description
or the TypeSource name, if the type of the context is not equal to the source type of the record.
(Inherited from TextLogRecordBuilder.) | |
GetContextForDescription | Obsolete.
Gets the LoggingContext that should be used when getting or appending the Description.
(Inherited from TextLogRecordBuilder.) | |
GetOutputMultiplexEventData |
Returns a list of properties that will be passed to the next backend in order if a multiplexer is used. See Remarks.
(Inherited from LogRecordBuilder.) | |
GetSourceName |
Gets the name of the TypeSource for the current record, respecting the IncludeNamespace property.
(Inherited from TextLogRecordBuilder.) | |
HasRecordKindName |
Determines whether the AppendRecordKind() will append anything for the current record.
(Inherited from TextLogRecordBuilder.) | |
MustBuildContextDescription |
Determines whether the current Description should be appended
to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
RequireComma |
Requires the next call to AppendCommaConditional() to append a comma even.
(Inherited from TextLogRecordBuilder.) | |
RequireDelimiter |
Causes the next call to the AppendDelimiterConditional() to append a
Delimiter to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
RequirePunctuation |
Requires the next call to AppendCommaConditional() to append a specific punctuation character.
(Inherited from TextLogRecordBuilder.) | |
Reset |
Resets all fields and properties of the current LogRecordBuilder to their initial value. Invoked by the
Complete() method.
(Inherited from TextLogRecordBuilder.) | |
SetException |
Sets the exception for the method or activity.
(Inherited from TextLogRecordBuilder.) | |
SetExecutionTime |
Sets the method or activity execution time.
(Inherited from TextLogRecordBuilder.) | |
SetMethodGenericParameter<T> |
Not implemented.
(Inherited from LogRecordBuilder.) | |
SetParameter<T>(Int32, String, ParameterKind, String, T) |
Sets the value of a given parameter and uses the default formatter.
(Inherited from LogRecordBuilder.) | |
SetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>) |
Sets the value of a given parameter and specifies the Formatter<T>.
(Inherited from LogRecordBuilder.) | |
SetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>) |
Sets the value of a given parameter and specifies the Formatter<T>.
(Inherited from TextLogRecordBuilder.) | |
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.
(Inherited from LogRecordBuilder.) | |
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.
(Inherited from LogRecordBuilder.) | |
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.
(Inherited from TextLogRecordBuilder.) | |
SetThis<T>(T) |
Sets the this (instance) value and uses the default formatter. This method is only invoked if the IncludeThisValue property is true.
(Inherited from LogRecordBuilder.) | |
SetThis<T>(T, IFormatter<T>) |
Sets the this (instance) value and uses a given formatter.
(Inherited from LogRecordBuilder.) | |
SetThis<T>(T, IFormatter<T>) |
Sets the this (instance) value and uses a given formatter.
(Inherited from TextLogRecordBuilder.) | |
SetTypeGenericParameter<T> |
Not implemented.
(Inherited from LogRecordBuilder.) | |
ShouldLogExceptionDetails |
Determines whether exception details should be appended to the text of the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
ToString | Returns a string that represents the current object. (Inherited from TextLogRecordBuilder.) | |
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.
(Inherited from LogRecordBuilder.) | |
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.
(Inherited from LogRecordBuilder.) | |
Write |
Writes the final message to the back-end.
(Overrides TextLogRecordBuilder.Write(UnsafeString).) | |
WriteCustomParameter<T>(Int32, ArraySegment<Char>, T) |
Writes a custom parameter (passed as an ArraySegment<char>) and uses the default formatter.
(Inherited from LogRecordBuilder.) | |
WriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions) |
Writes a custom parameter (passed as an CharSpan) and uses the default formatter.
(Inherited from LogRecordBuilder.) | |
WriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>) |
Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.
(Inherited from LogRecordBuilder.) | |
WriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>) |
Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.
(Inherited from TextLogRecordBuilder.) | |
WriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>) |
Writes a custom parameter (passed as an CharSpan) and uses a given formatter.
(Inherited from LogRecordBuilder.) | |
WriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>) |
Writes a custom parameter (passed as an CharSpan) and uses a given formatter.
(Inherited from TextLogRecordBuilder.) | |
WriteCustomString(ArraySegment<Char>) |
Write a custom string passed as an ArraySegment<char>.
(Inherited from TextLogRecordBuilder.) | |
WriteCustomString(CharSpan) |
Write a custom string passed as an CharSpan.
(Inherited from TextLogRecordBuilder.) | |
WriteProperty(LoggingProperty, Object, Int32) | Obsolete.
Appends the name and value of a property to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) | |
WriteProperty<T>(String, T, Int32, LoggingPropertyOptions) |
Appends the name and value of a property to the current StringBuilder.
(Inherited from TextLogRecordBuilder.) |