Classes
InvalidFormattingStringException
Exception thrown by the FormattingStringParser and by the Logger class
when user code provides an invalid formatting string.
LegacySourceLogger
A base class for implementations of ILogger that cannot depend on the PostSharp.Patterns.Diagnostics package.
LogEventMetadata
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.
LogEventMetadata<TExpressionModel>
A specialization of LogEventMetadata that specifies the expression model type, that is, the type exposed to transaction policy expressions.
LogLevelSource
A facade for a LogSource constrained to a specific LogLevel. Instances of the LogLevelSource class are exposed as properties of the LogSource class, for example Debug or Error.
LoggingPropertyOptionsAttribute
Specifies the options (LoggingPropertyOptions) of a logging property that is expressed as a public property of a CLR type.
Structs
CustomLogParameterOptions
Options of the WriteCustomParameter<T>(int, in CharSpan, T, in CustomLogParameterOptions) method.
CustomLogRecordOptions
Options of the BeginWriteItem(CustomLogRecordItem, in CustomLogRecordTextOptions) method.
CustomLogRecordTextOptions
Options of the BeginWriteItem(CustomLogRecordItem, in CustomLogRecordTextOptions) method.
FormattingStringParser
Represents a parser of the formatting string for custom messages of the Logger and LogActivity classes.
LogEventData
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 come from the properties of the CLR object. To change the logic that maps the CLR object to the list of properties, you can specify a LogEventMetadata.
LoggingPropertiesExpressionModel
Represents the type of the t parameters for if and sample expressions in the policy configuration file.
LoggingPropertyOptions
Specifies the behavior of logging properties (exposed by LogEventData), such as IsRendered, IsInherited or IsBaggage.
LoggingPropertyVisitorOptions
Specifies the behavior of the VisitProperties<TVisitorState>(ILoggingPropertyVisitor<TVisitorState>, ref TVisitorState, in LoggingPropertyVisitorOptions) method.
Interfaces
IContextLocalLogger
Defines an abstraction of custom logging methods where the context has already been resolved.
ICustomLogRecordBuilder
Defines a builder of custom log records. A log record is typically, but not necessarily, a string. A log record can be composed of one or several items.
ILogActivityOptions
Exposes the default verbosity of the Logger and LogActivity classes when creating and closing activities.
ILogger
Defines an abstraction of the logging facility, through which other components emit their log records. This interface abstracts other PostSharp components from the PostSharp.Patterns.Diagnostics component.
ILogger2
Extends ILogger.
ILogger3
Extends ILogger2.
ILoggerExceptionHandler
Defines methods that are called when an exception occurs in the Logger class. This interface can be implemented by any class that implements the ILogger interface. When an ILogger does not implement this interface, logging exceptions are silently ignored.
ILoggerFactory
Defines a factory that creates instances of the ILogger interface. An instance of this interface must be registered with the ServiceLocator.
ILoggerFactory2
Defines a factory that creates instances of the ILogger2 interface.
ILoggerFactory3
Defines a factory that creates instances of the ILogger2 interface based on names, in addition to types.
ILoggerFactoryProvider
Defines a provider that creates instances of ILoggerFactory2. An instance of this interface must be registered with the ServiceLocator.
ILoggerFactoryProvider3
Defines a new version of ILoggerFactoryProvider that also provides a logger factory, which can create loggers based on names rather than on a type.
ILoggingPropertyVisitor<TState>
Defines a Visit<TValue>(string, TValue, in LoggingPropertyOptions, ref TState) method invoked for each property of a LogEventData.
Enums
CustomLogParameterMode
Specifies how a parameter of a custom record should be rendered by the WriteCustomParameter<T>(int, in CharSpan, T, in CustomLogParameterOptions) method.
CustomLogRecordAttributes
Attributes of the CustomLogParameterOptions class. Describes how the ICustomLogRecordBuilder will be used.
CustomLogRecordItem
Enumerates the situations in which an IMessage can be rendered.