PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​BackendsText­Logging­Backend­Options
Open sandboxFocus

TextLoggingBackendOptions Class

Options for the TextLoggingBackendOptions class.

Namespace: PostSharp.Patterns.Diagnostics.Backends
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class TextLoggingBackendOptions : LoggingBackendOptions

Constructors

Name Description
TextLoggingBackendOptions()

Properties

Name Description
ActionMaxLength

Max length of a log record. The default value is 2048.

AppendTrailingPeriod

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.

Delimiter

String used to separate different parts of the logging record. The default value is a pipe surrounded by spaces (|).

ExceptionFormatter

The Formatter<T> used to format the Exception in which a method or custom activity results. This is different than the formatter used to format parameter or property values of Exception type. The default implementation prints the full type name of the Exception.

IncludeExceptionDetails

Determines whether exception details (basically Exception.ToString) should be appended to the log. The default value is false.

IncludeNamespace

Determines whether the full namespace of types should be included in the log. The default value is false.

IncludeType

Determines whether the name of the type of the logged method should be included in the log. The default value is true.

IndentSpaces

Number of spaces for each indentation level. The default value is 2.

ParameterPrefix

Gets or sets the prefix used for parameter names. The default value is @.

PropertyPrefix

Gets or sets the prefix used for custom property names. The default value is #.

ReturnItemPrefix

Gets or sets the prefix used for return values. The default value is $

ShouldLogExceptionPredicate

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.