PostSharp 5.0 / / Post­Sharp Documentation / Logging


PostSharp Logging allows you to add logging to your complete solution in just a few lines of code.

It has the following benefits:

  • Can produce super-detailed logs including parameter values and execution time.

  • Can stay turned off by default and be dynamically enabled on-demand, with fine-grained control over types and namespaces, when a problem happens in production.

  • Super fast. In fact, faster than string.Format.

  • Fully customizable. Works with your logging framework (even your custom one)

  • Supports a broad set of logging frameworks.

In this chapter



Adding Detailed Logging to your Solution

This article shows how to add detailed logging to your application.

Customizing the Appearance of Log Records

This article describes how to customize the log records. It covers both build-time configuration (logging profiles) and run-time configuration.

Implementing a Custom Formatter

This article shows how to create your own formatter to display the value of parameter values.

Enabling and Disabling Logging At Run Time

This article shows how to enable and disable logging for a specific type and namespace, and message severity.

Adding Audit to your Solution

This article shows how to automatically add audit records to your application.

Implementing an Adapter to a Custom Logging Framework

This article demonstrates how to use your own logging framework with PostSharp Logging.

Upgrading from PostSharp Diagnostics 4.3

This article lists a few breaking changes between PostSharp 4.3 and PostSharp 5.0 and how to cope with them.

Licensing of PostSharp Diagnostics

This article describes important details about licensing of PostSharp Diagnostics.

See Also