PostSharp6.8//API Reference/Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace

PostSharp.Patterns.Diagnostics.Custom Namespace

This namespace contains the implementation of the custom logging front-end API. It is generally not needed in user code. It is normally not necessary to reference this namespace in user code, as the use of the var keyword is recommended.
Public classInvalidFormattingStringException
Exception thrown by the FormattingStringParser and by the Logger class when user code provides an invalid formatting string.
Public classLegacySourceLogger
A base class for implementations of ILogger that cannot depend on the PostSharp.Patterns.Diagnostics package.
Public classLogEventMetadata
Defines how the raw CLR object stored in a LogEventData is translated into a set of visitable properties and an expression that is accessible from the transaction policy expressions.
Public classLogEventMetadata<TExpressionModel>
A specialization of LogEventMetadata that specifies the type of the expression model type, i.e. the type exposed to transaction policy expressions.
Public classLoggingPropertyOptionsAttribute
Specifies the options (LoggingPropertyOptions) of a logging property that is expresses as a public property of a CLR type.
Public classLogLevelSource
A facade to a LogSource constrained to a specific LogLevel. Instances of the LogLevelSource class are exposed as properties of the LogSource class, e.g. Debug or Error.
Public structureCustomLogParameterOptions
Public structureCustomLogRecordOptions
Public structureCustomLogRecordTextOptions
Public structureFormattingStringParser
Parses the formatting string for custom messages of the Logger and LogActivity classes.
Public structureLogEventData
Specifies the properties of a log event (such as a message, an activity opening or an activity closing). Properties are typically passed in user code as an instance of an anonymous type. Any object can be provided. The properties of the message then stem from the properties of the CLR object. To change the logic that maps the CLR object to the list of property, you can specify a LogEventMetadata.
Public structureLoggingPropertiesExpressionModel
Type of the t parameters for if and sample expressions in the policy configuration file.
Public structureLoggingPropertyOptions
Specifies the behavior of logging properties (exposed by LogEventData), such as IsRendered, IsInherited or IsBaggage.
Public structureLoggingPropertyVisitorOptions
Public interfaceIContextLocalLogger
Abstraction of custom logging methods where the contact has already been resolved.
Public interfaceICustomLogRecordBuilder
Allows to build a custom log record (typically, but not necessarily, a string). A log record can be composed of one of several items.
Public interfaceILogActivityOptions
Exposes the default verbosity of the Logger and LogActivity classes when creating and closing activities.
Public interfaceILogger
Abstraction of the Logging facility, through which other components emit their log records. This interfaces abstracts other PostSharp components from the PostSharp.Patterns.Diagnostics component.
Public interfaceILogger2
Extends ILogger.
Public interfaceILoggerExceptionHandler
Defines methods called in case of exception in the Logger class. This interface can be implemented by any class implementing the ILogger interface. When an ILogger does not implement this interface, logging exceptions are simply silently ignored.
Public interfaceILoggerFactory
Creates instances of the ILogger interface. An instance of this interface must be registered into the ServiceLocator.
Public interfaceILoggerFactory2
Creates instances of the ILogger2 interface.
Public interfaceILoggerFactory3
Creates instances of the ILogger2 interface based on names rather than types, in addition to based on types.
Public interfaceILoggerFactoryProvider
Creates instances of ILoggerFactory2. An instance of this interface must be registered into the ServiceLocator.
Public interfaceILoggerFactoryProvider3
A new version of ILoggerFactoryProvider that also provides a logger factory that can create loggers based on names rather than based on a type.
Public interfaceILoggingPropertyVisitor<TState>
Defines a Visit<TValue>(String, TValue, LoggingPropertyOptions, TState) method invoked for each property of a LogEventData.
Public enumerationCustomLogParameterMode
Determines how a parameter of a custom record should be rendered by the WriteCustomParameter<T>(Int32, CharSpan, T, CustomLogParameterOptions) method.
Public enumerationCustomLogRecordAttributes
Attributes of the CustomLogParameterOptions class. Describes how the ICustomLogRecordBuilder will be used.
Public enumerationCustomLogRecordItem
Enumerates the situations in which an IMessage can be rendered.