PostSharp 5.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Backends.​Serilog Namespace / Serilog­Logging­Backend­Options Class

SerilogLoggingBackendOptions Class

Options for SerilogLoggingBackend.
Inheritance Hierarchy

Namespace:  PostSharp.Patterns.Diagnostics.Backends.Serilog
Assembly:  PostSharp.Patterns.Diagnostics.Backends.Serilog (in PostSharp.Patterns.Diagnostics.Backends.Serilog.dll) Version: (
public class SerilogLoggingBackendOptions : TextLoggingBackendOptions

The SerilogLoggingBackendOptions type exposes the following members.

Public methodSerilogLoggingBackendOptions
Initializes a new SerilogLoggingBackendOptions.
Public propertyActionMaxLength
Max length of a log record. The default value is 2048.
(Inherited from TextLoggingBackendOptions.)
Public propertyAppendTrailingPeriod
Determines whether log messages should be ended with a trailing period. The default value is true because we really like trailing periods at PostSharp, but other opinions are valid.
(Inherited from TextLoggingBackendOptions.)
Public propertyContextMaxLength
Max length of the Description property.
(Inherited from LoggingBackendOptions.)
Public propertyDelimiter
String used to separate different parts of the logging record. The default value is a pipe surrounded by spaces ( | ).
(Inherited from TextLoggingBackendOptions.)
Public propertyGetLogger
Function mapping an SerilogLoggingTypeSource to a Serilog ILogger. The default behavior is to call typeSource.Backend.Logger.ForContext( typeSource.SourceType ).
Public propertyIncludeExceptionDetails
Determines whether exception details (basically Exception.ToString) should be appended to the log. The default value is false.
(Inherited from TextLoggingBackendOptions.)
Public propertyIncludeNamespace
Determines whether the full namespace of types should be included in the log. The default value is false.
(Inherited from TextLoggingBackendOptions.)
Public propertyIncludeType
Determines whether the name of the type of the logged method should be included in the log. The default value is true.
(Inherited from TextLoggingBackendOptions.)
Public propertyIndentSpaces
Number of spaces for each indentation level. The default value is 2.
(Inherited from TextLoggingBackendOptions.)
Public propertyLogLevelIgnoredForSystemRecords (Inherited from LoggingBackendOptions.)
Public propertySemanticParametersTreatedSemantically
Gets or sets the kinds of semantic parameters that must be mapped to Serilog semantic parameters.
Public propertyShouldLogExceptionPredicate
Gets or sets a predicate that determines whether an exception should be logged. This predicate is evaluated only when the method entry is not logged. When the method entry is logged, exceptions are always logged.
(Inherited from TextLoggingBackendOptions.)
Public propertyUseSerilogFormatters
Determines whether Serilog formatters should be used instead of PostSharp formatters. The default value is false.
Public fieldStatic memberSemanticParametersRequiredTreatedSemantically
Kinds of semantic parameters that are required to be mapped to Serilog parameters. This is the default value of the SemanticParametersTreatedSemantically property. This constant is set to ParameterValue | Exception | ReturnValue | ReturnItemValue | Duration | This.
Extension Methods
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
See Also