PostSharp6.4/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Backends.​Serilog Namespace/Serilog­Log­Record­Builder Class

SerilogLogRecordBuilder Class

Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Diagnostics.RecordBuilders.LogRecordBuilder
    PostSharp.Patterns.Diagnostics.RecordBuilders.TextLogRecordBuilder
      PostSharp.Patterns.Diagnostics.Backends.Serilog.SerilogLogRecordBuilder

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Serilog
Assembly:  PostSharp.Patterns.Diagnostics.Backends.Serilog (in PostSharp.Patterns.Diagnostics.Backends.Serilog.dll) Version: 6.4.3.0 (6.4.3.0)
Syntax
C#
public class SerilogLogRecordBuilder : TextLogRecordBuilder

The SerilogLogRecordBuilder type exposes the following members.

Constructors
  NameDescription
Public methodSerilogLogRecordBuilder
Creates an instance of SerilogLogRecordBuilder.
Properties
  NameDescription
Public propertyBackend
Gets the parent back-end.
(Inherited from TextLogRecordBuilder.)
Public propertyBackendOptions
Shortcut for this.Backend.Options.
(Inherited from TextLogRecordBuilder.)
Protected propertyContext
Gets the LoggingContext to which the record belongs.
(Inherited from LogRecordBuilder.)
Protected propertyCustomRecordAttributes
Describes how the LogRecordBuilder will be used, when it is being used to build a custom message or a custom activity.
(Inherited from LogRecordBuilder.)
Public propertyException
Gets the Exception for the current record, or null if no exception is associated to the current record.
(Inherited from TextLogRecordBuilder.)
Public propertyIsDisposed
Determines whether the current instance has been disposed.
(Inherited from LogRecordBuilder.)
Protected propertyLevel
Gets the LogLevel for the current record.
(Inherited from TextLogRecordBuilder.)
Public propertyMemberName
Gets the name of the method, property or field for the current record.
(Inherited from TextLogRecordBuilder.)
Protected propertyMessageTemplateTokens
Gets the list of MessageTemplateToken for the current log record.
Protected propertyOptions
Gets the LoggingOptions for the current record.
(Inherited from TextLogRecordBuilder.)
Protected propertyProfile
Gets the LoggingProfile for the current record.
(Inherited from TextLogRecordBuilder.)
Protected propertyProperties
Gets the list of properties for the current log record.
Protected propertyRecordKind
Gets the kind of the current record (e.g. MethodEntry or MethodException).
(Inherited from LogRecordBuilder.)
Public propertySourceLineInfo
Gets the SourceLineInfo for the current record.
(Inherited from TextLogRecordBuilder.)
Public propertySourceType
Gets the source Type of the current record.
(Inherited from TextLogRecordBuilder.)
Protected propertyStringBuilder
Gets the current UnsafeStringBuilder where everything is being appended.
(Inherited from TextLogRecordBuilder.)
Public propertySyntheticId
Gets a cross-process globally unique identifier for the current LoggingContext. This value is created according to value of the LoggingBackend.Options.SyntheticIdFormatter property.
(Inherited from LogRecordBuilder.)
Protected propertyThreadContext
Gets the ThreadLoggingContext to which the current LogRecordBuilder belongs.
(Inherited from LogRecordBuilder.)
Protected propertyTypeSource
Gets the LoggingTypeSource for the current record.
(Inherited from TextLogRecordBuilder.)
Methods
  NameDescription
Protected methodAddHiddenCustomParameter<T> (Inherited from TextLogRecordBuilder.)
Protected methodAppendAsyncInfo
Appends information about the async method to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendClosingParenthesisConditional
Appends a closing parenthesis to the current StringBuilder if required.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendComma
Appends a command and a space to the current StringBuilder, and resets the required punctuation set by RequireComma() or RequirePunctuation(Char).
(Inherited from TextLogRecordBuilder.)
Protected methodAppendCommaConditional
Appends a comma to the current StringBuilder, unless this method is invoked for the first time for the current record.
(Inherited from TextLogRecordBuilder.)
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.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendContextDescription(LoggingContext)
Appends the context Description to the current StringBuilder.
(Overrides TextLogRecordBuilder.AppendContextDescription(LoggingContext).)
Protected methodAppendDelimiter
Appends a Delimiter to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendDelimiterConditional
Appends a Delimiter to the current StringBuilder if the RequireDelimiter() method has been called previously.
(Inherited from TextLogRecordBuilder.)
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.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendExceptionDetails
Appends exception details to StringBuilder if IncludeExceptionDetails is set.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendExecutionTime
Appends the execution time to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendExecutionTimeThreshold
Appends the execution time threshold to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendIndentString
Appends indentation for the given to StringBuilder.
(Overrides TextLogRecordBuilder.AppendIndentString(Int32).)
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.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendOpeningParenthesis
Appends an opening parenthesis to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendProlog
Appends the indent string, context description, and the record kind to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendRecordKind
Appends the LogRecordKind of the current record to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
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.
(Overrides TextLogRecordBuilder.AppendSemanticParameter(SemanticParameterKind, String, String, String, Int32).)
Protected methodAppendSemanticParameter(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.
(Overrides TextLogRecordBuilder.AppendSemanticParameter(SemanticParameterKind, String, Object, IFormatter, String, Int32).)
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.
(Overrides TextLogRecordBuilder.AppendSemanticParameter<T>(SemanticParameterKind, ArraySegment<Char>, T, IFormatter<T>, String, Int32).)
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. This method overload is strongly typed.
(Overrides TextLogRecordBuilder.AppendSemanticParameter<T>(SemanticParameterKind, String, T, IFormatter<T>, String, Int32).)
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.
(Inherited from TextLogRecordBuilder.)
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. This method overload is strongly typed.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendSourceLineInfo
Appends source (file, line) information to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendSpaces
Appends a given number of spaces to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendSpecialChar
Appends a special Char (which may require escaping with specific back-ends) to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendTrailingPeriod
Appends a trailing period (.) to the current StringBuilder, respecting the AppendTrailingPeriod property.
(Inherited from TextLogRecordBuilder.)
Protected methodAppendTypeName
Appends the name of the TypeSource to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Public methodBeginCustomRecord
Initializes the current LogRecordBuilder to emit a custom record.
(Inherited from TextLogRecordBuilder.)
Public methodBeginRecord
Initializes the current LogRecordBuilder to emit a standard (i.e. non-custom) record for a given context and method.
(Overrides TextLogRecordBuilder.BeginRecord(LoggingContext, LogRecordInfo, LogMemberInfo).)
Public methodBeginWriteItem (Inherited from TextLogRecordBuilder.)
Public methodComplete
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.)
Public methodDispose
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.
(Overrides TextLogRecordBuilder.Dispose().)
Protected methodEmitRecord()
Emits the record. Invoked by the Complete() method.
(Overrides TextLogRecordBuilder.EmitRecord().)
Protected methodEmitRecord(Boolean)
Emits the record and specifies whether exception details should be appended to the text.
(Inherited from TextLogRecordBuilder.)
Protected methodEndContextDescription
Ends building the context Description and starts building the action text.
(Overrides TextLogRecordBuilder.EndContextDescription().)
Protected methodEndContextDescriptionConditional
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.)
Public methodEndWriteItem
Ends building a specified item.
(Inherited from TextLogRecordBuilder.)
Public methodForEachProperty(LoggingPropertyVisitor<Object>)
Invokes a delegate for each property defined in the current log record.
(Inherited from LogRecordBuilder.)
Public methodForEachProperty<T>(LoggingPropertyVisitor<T>, T)
Invokes a delegate for each property defined in the current log record.
(Inherited from LogRecordBuilder.)
Protected methodGetContextDescription 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.)
Protected methodGetContextDescriptionUnsafe 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.)
Protected methodGetContextForDescription Obsolete.
Gets the LoggingContext that should be used when getting or appending the Description.
(Inherited from TextLogRecordBuilder.)
Protected methodGetSourceName
Gets the name of the TypeSource for the current record, respecting the IncludeNamespace property.
(Inherited from TextLogRecordBuilder.)
Protected methodHasRecordKindName
Determines whether the AppendRecordKind() will append anything for the current record.
(Inherited from TextLogRecordBuilder.)
Protected methodMustBuildContextDescription
Determines whether the current Description should be appended to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodRequireComma
Requires the next call to AppendCommaConditional() to append a comma even.
(Inherited from TextLogRecordBuilder.)
Protected methodRequireDelimiter
Causes the next call to the AppendDelimiterConditional() to append a Delimiter to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Protected methodRequirePunctuation
Requires the next call to AppendCommaConditional() to append a specific punctuation character.
(Inherited from TextLogRecordBuilder.)
Protected methodReset
Resets all fields and properties of the current LogRecordBuilder to their initial value. Invoked by the Complete() method.
(Overrides TextLogRecordBuilder.Reset().)
Public methodSetException
Sets the exception for the method or activity.
(Inherited from TextLogRecordBuilder.)
Public methodSetExecutionTime
Sets the method or activity execution time.
(Inherited from TextLogRecordBuilder.)
Public methodSetMethodGenericParameter<T>
Not implemented.
(Inherited from LogRecordBuilder.)
Public methodSetParameter<T>(Int32, String, ParameterKind, String, T)
Sets the value of a given parameter and uses the default formatter.
(Inherited from LogRecordBuilder.)
Public methodSetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>)
Sets the value of a given parameter and specifies the Formatter<T>.
(Inherited from LogRecordBuilder.)
Public methodSetParameter<T>(Int32, String, ParameterKind, String, T, IFormatter<T>)
Sets the value of a given parameter and specifies the Formatter<T>.
(Inherited from TextLogRecordBuilder.)
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.
(Inherited from TextLogRecordBuilder.)
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.
(Inherited from TextLogRecordBuilder.)
Public methodSetTypeGenericParameter<T>
Not implemented.
(Inherited from LogRecordBuilder.)
Protected methodShouldLogExceptionDetails
Determines whether exception details should be appended to the text of the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
Public methodToString
Returns a string that represents the current object.
(Inherited from TextLogRecordBuilder.)
Protected methodWrite
Writes the final message to the back-end.
(Overrides TextLogRecordBuilder.Write(UnsafeString).)
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T)
Writes a custom parameter (passed as an ArraySegment<char>) and uses the default formatter.
(Inherited from LogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions)
Writes a custom parameter (passed as an CharSpan) and uses the default formatter.
(Inherited from LogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>)
Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.
(Inherited from LogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, ArraySegment<Char>, T, IFormatter<T>)
Writes a custom parameter (passed as an ArraySegment<char>) and uses a given formatter.
(Inherited from TextLogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>) (Inherited from LogRecordBuilder.)
Public methodWriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions, IFormatter<T>) (Inherited from TextLogRecordBuilder.)
Public methodWriteCustomString(ArraySegment<Char>)
Write a custom string passed as an ArraySegment<char>.
(Inherited from TextLogRecordBuilder.)
Public methodWriteCustomString(CharSpan) (Inherited from TextLogRecordBuilder.)
Protected methodWriteProperty
Appends the name and value of a property to the current StringBuilder.
(Inherited from TextLogRecordBuilder.)
See Also