PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics Namespace

PostSharp.Patterns.Diagnostics Namespace

This namespace contains a logging aspect.
Public classCustomRecordLoggingOptions
Options for custom logging records. Exposed on the CustomRecordLoggingOptions property.
Public classDefaultLoggingExceptionHandler
An implementation of the ILoggingExceptionHandler that attempts to log exceptions to the Meta logging role, then disables the backlog in case of internal exception (but not in case of invalid user code). Not to be confused with ILoggerExceptionHandler.
Public classFormattedMessageBuilder
Creates messages based on a human-readable formatted string. These messages are suitable for structured logging are not optimal for machine analysis. For more succinct code, consider including the using static PostSharp.Patterns.Diagnostics.FormattedMessageBuilder statement.
Public classLogActivity
Represents a logged custom activity, i.e. something that a beginning and an end with a specific outcome. This class is instantiated by the legacy API of the Logger class. For the modern API, see LogActivity<TActivityDescription>.
Public classLogAttribute
Custom attribute that, when applied on a method, causes PostSharp to implement tracing before and after execution of this method.
Public classLogAttributeBase
Base class for all method-level logging aspects.
Public classLogExceptionAttribute
Custom attribute that, when applied on a method, causes PostSharp to implement tracing upon exception in this method.
Public classLogger
Allows to emit custom log records and define custom activities. This class is obsolete. Use LogSource for new developments.
Public classLoggerFactoryExtensions
Extension methods for the ILoggerFactory interface.
Public classLoggingAbstractSource
Exposes the current LoggingTypeSource for a given role and Type.
Public classLoggingBackend
Base class for all logging back-ends (sometimes names sinks, targets, listeners) of the PostSharp logging system.
Public classLoggingBackendOptions
Options for the LoggingBackend class.
Public classLoggingBuildTimeConfiguration
Root element of the XML configuration (postsharp.config) for the Logging component.
Public classLoggingConfigurationManager
Configures a LoggingBackend from an XML file.
Public classLoggingContextLocalConfiguration
Stores the context-sensitive configuration, i.e. the configuration that is specific to the current execution context.
Public classLoggingContextMismatchException
Exception thrown when an operation assumes a different current LoggingContext.
Public classLoggingException
Exception thrown by ThrowingLoggingExceptionHandler when the logging subsystem throws an exception. The InnerException property gets the original Exception.
Public classLoggingExceptionInfo
Public classLoggingNamespaceSource
Allows to enable or disable logging for a whole namespace.
Public classLoggingOptions
Represents the build-time options for logging records. This class is exposed by DefaultOptions and ExceptionOptions. The values of this class cannot be changed at run-time because they influence the way PostSharp instruments the code.
Public classLoggingProfile
Logging profiles are named configurations of logging aspects and influence the way PostSharp generates the code instrumentation. They are typically instantiated in postsharp.config.
Public classLoggingProfileCollection
Collection of instances of the LoggingProfile class.
Public classLoggingProfileRepository
Provides access to logging profiles (LoggingProfile) at run-time. Exposed by the Profiles property. Note that each assembly of the AppDomain contains its own copy of each LoggingProfile used in this assembly, and each copy may be different, even if they have the same name.
Public classLoggingProperty
Represents a property (a name, a value and a few options).
Public classLoggingRoleConfiguration
Role-specific logging options. There is one instance of the LoggingRoleConfiguration class for each logging role. The LoggingRoleConfiguration is a run-time concept, with no build-time meaning.
Public classLoggingRoleConfigurationRepository
Provides access to role-specific options (LoggingRoleConfiguration). This class is exposed on the Profiles.
Public classLoggingRoles
List of standard logging roles.
Public classLoggingServices
The entry point to configure PostSharp.Patterns.Diagnostics logging at run-time.
Public classLoggingServices.Formatters
Provides access to formatters. This class is exposed on the LoggingServices.Formatters property.
Public classLoggingTypeSource
Allows to enable or disable logging for a specific type and exposes some information regarding the verbosity for this type. Note that a type here does not need to map to a .NET type. It can be an arbitrary dot-separated string.
Public classLoggingVerbosityConfiguration
Manages the configuration of the minimal LogLevel for individual types and namespaces. This class is exposed by the Verbosity property. To create a new instance of this class, call CreateVerbosityConfiguration().
Public classLogRecordKindExtensions
Extensions to the LogRecordKind enum.
Public classLogSource
Allow to write log messages and trace the execution of activities. This class is optimized for use with C# 7.2 or later. For previous compiler versions, consider using the legacy Logger class.
Public classLogValueAttribute
Custom attribute that, when applied on a field or property, causes PostSharp to implement tracing when its value changes.
Public classNotLoggedAttribute
Indicates that the value of this parameter should not be logged.
Public classSemanticMessageBuilder
Creates semantic messages composed of a message name and a list of properties given as name-value pairs. These messages are ideal for machine analysis. For more succinct code, consider including the using static PostSharp.Patterns.Diagnostics.MessageBuilder statement.
Public classThrowingLoggingExceptionHandler
An implementation of the ILoggingExceptionHandler that throws a LoggingException or an InvalidOperationException.
Public structureCloseActivityOptions
Options of the closing methods of the LogActivity<TActivityDescription> type.
Public structureLogActivity<TActivityDescription>
Represents a logged custom activity, i.e. something that has a beginning and an end with a specific outcome. This class is instantiated by the new API of the LogSource class.
Public structureLogActivityOptions
Options of a new LogActivity.
Public structureLoggingContextLocalConfigurationScope
Represents a scope started with the WithContextLocalConfiguration(LoggingContextLocalConfiguration) method. Dispose the scope to close it. It is recommended to use the using keyword.
Public structureLoggingSourceLocalState
Stores the state of a LoggingAbstractSource for the current execution context.
Public structureOpenActivityOptions
Argument of the OpenActivity<T>(T, OpenActivityOptions) method.
Public structureWriteMessageOptions
Options for the Exception method.
Public interfaceILogActivity
Exposes the public API of the generic value type LogActivity<TActivityDescription>.
Public interfaceILogAspect
Base interface for all method-level logging aspects.
Public interfaceILoggingExceptionHandler
Defines methods called in case of exception in the logging component.
Public interfaceILogValueAspect
Base interface for all location-level logging aspects.
Public enumerationContextIdGenerationStrategy
Enumerates the different strategies to generate the value of the Id strategy.
Public enumerationLogActivityKind
Kinds of LogActivity.
Public enumerationLogLevel
Specifies the severity of a logged message.
Public enumerationLogRecordKind
Kinds of log entry.