PostSharp5.0/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Record­Builders Namespace/Text­Log­Record­Builder Class/Text­Log­Record­Builder Methods

TextLogRecordBuilder Methods

The TextLogRecordBuilder type exposes the following members.

Methods
  NameDescription
Protected methodAppendAsyncInfo
Appends information about the async method to the current StringBuilder.
Protected methodAppendClosingParenthesisConditional
Protected methodAppendComma
Appends a comma to the current StringBuilder, unless this method is invoked for the first time for the current record.
Protected methodAppendContextDescription
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.
Protected methodAppendDelimiter
Appends a Delimiter to the current StringBuilder.
Protected methodAppendDelimiterConditional
Appends a Delimiter to the current StringBuilder if the RequireDelimiter() method has been called previously.
Protected methodAppendEpilogue
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.
Protected methodAppendExceptionDetails
Appends exception details to StringBuilder if IncludeExceptionDetails is set.
Protected methodAppendExecutionTime
Appends the execution time to the current StringBuilder.
Protected methodAppendExecutionTimeThreshold
Protected methodAppendIndentString
Appends indentation for the given to StringBuilder.
Protected methodAppendMemberName
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.
Protected methodAppendOpeningParenthesis
Appends an opening parenthesis to the current StringBuilder.
Protected methodAppendProlog
Appends the indent string, context description, and the record kind to the current StringBuilder.
Protected methodAppendRecordKind
Appends the LogRecordKind of the current record to the current StringBuilder.
Protected methodAppendSemanticParameter(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.
Protected methodAppendSemanticParameter<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.
Protected methodAppendSemanticParameter<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.
Protected methodAppendSourceLineInfo
Appends source (file, line) information to the current StringBuilder.
Protected methodAppendSourceName
Appends the name of the TypeSource to the current StringBuilder.
Protected methodAppendSpaces
Appends a given number of spaces to the current StringBuilder.
Protected methodAppendSpecialChar
Appends a special Char (which may require escaping with specific back-ends) to the current StringBuilder.
Protected methodAppendTrailingPeriod
Appends a trailing period (.) to the current StringBuilder, respecting the AppendTrailingPeriod property.
Public methodBeginCustomRecord
Initializes the current LogRecordBuilder to emit a custom record.
(Overrides LogRecordBuilder.BeginCustomRecord(LoggingContext, CustomLogRecordInfo).)
Public methodBeginRecord
Initializes the current LogRecordBuilder to emit a standard (i.e. non-custom) record for a given context and method.
(Overrides LogRecordBuilder.BeginRecord(LoggingContext, LogRecordInfo, LogMemberInfo).)
Public methodComplete
Emits the record and resets the current LogRecordBuilder. This method invoked after all SetThis<T>(T), SetParameter<T>(Int32, String, ParameterDirection, String, T) and similar methods have been called.
(Inherited from LogRecordBuilder.)
Protected methodEmitRecord()
Emits the record. Invoked by the Complete() method.
(Overrides LogRecordBuilder.EmitRecord().)
Protected methodEmitRecord(Boolean)
Emits the record and specifies whether exception details should be appended to the text.
Protected methodEndContextDescription
Ends building the context Description and starts building the action text.
Protected methodEndContextDescriptionConditional
Switches between building the context Description and the action text. If the EndContextDescriptionConditional() method has been previously invoked, subsequent calls are ignored.
Protected methodGetContextDescription
Gets the context Description or the TypeSource name, if the type of the context is not equal to the source type of the record.
Protected methodGetContextDescriptionUnsafe
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.
Protected methodGetContextForDescription
Gets the LoggingContext that should be used when getting or appending the Description.
Protected methodGetSourceName
Gets the name of the TypeSource for the current record, respecting the IncludeNamespace property.
Protected methodHasRecordKindName
Determines whether the AppendRecordKind() will append anything for the current record.
Protected methodMustAppendContextDescription
Determines whether the current Description should be appended to the current StringBuilder.
Protected methodRequireComma
Makes the AppendComma() to append a comma even if it's invoked for the first time.
Protected methodRequireDelimiter
Causes the next call to the AppendDelimiterConditional() to append a Delimiter to the current StringBuilder.
Protected methodReset
Resets all fields and properties of the current LogRecordBuilder to their initial value. Invoked by the Complete() method.
(Overrides LogRecordBuilder.Reset().)
Public methodSetException
Sets the exception for the method or activity.
(Overrides LogRecordBuilder.SetException(Exception).)
Public methodSetExecutionTime
Sets the method or activity execution time.
(Overrides LogRecordBuilder.SetExecutionTime(Double, Boolean).)
Public methodSetMethodGenericParameter<T>
Not implemented.
(Inherited from LogRecordBuilder.)
Public methodSetParameter<T>(Int32, String, ParameterDirection, String, T)
Sets the value of a given parameter and uses the default formatter.
(Inherited from LogRecordBuilder.)
Public methodSetParameter<T>(Int32, String, ParameterDirection, String, T, IFormatter<T>)
Sets the value of a given parameter and uses the default formatter.
(Inherited from LogRecordBuilder.)
Public methodSetParameter<T>(Int32, String, ParameterDirection, String, T, IFormatter<T>)
Sets the value of a given parameter and uses the default formatter.
(Overrides LogRecordBuilder.SetParameter<T>(Int32, String, ParameterDirection, String, T, IFormatter<T>).)
Public methodSetReturnValue<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.)
Public methodSetReturnValue<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.)
Public methodSetReturnValue<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.
(Overrides LogRecordBuilder.SetReturnValue<T>(Int32, String, String, T, IFormatter<T>).)
Public methodSetThis<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.)
Public methodSetThis<T>(T, IFormatter<T>)
Sets the this (instance) value and uses a given formatter.
(Inherited from LogRecordBuilder.)
Public methodSetThis<T>(T, IFormatter<T>)
Sets the this (instance) value and uses a given formatter.
(Overrides LogRecordBuilder.SetThis<T>(T, IFormatter<T>).)
Public methodSetTypeGenericParameter<T>
Not implemented.
(Inherited from LogRecordBuilder.)
Protected methodShouldLogExceptionDetails
Determines whether exception details should be appended to the text of the current StringBuilder.
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
Protected methodWrite
Writes the final message to the back-end.
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T)
Writes a custom parameter and uses the default formatter.
(Inherited from LogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>)
Writes a custom parameter and uses a given formatter.
(Inherited from LogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>)
Writes a custom parameter and uses a given formatter.
(Overrides LogRecordBuilder.WriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>).)
Public methodWriteCustomString
Write a chunk of custom string.
(Overrides LogRecordBuilder.WriteCustomString(ArraySegment<Char>).)
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
See Also