Writes log messages to PostSharp Logging.
Implements
Namespace: PostSharp.Patterns.Diagnostics.Backends.NLog
Assembly: PostSharp.Patterns.Diagnostics.Backends.NLog.dll
Syntax
public class NLogCollectingTarget : Target, IDisposableRemarks
Add this target to the NLog configuration that your code uses for manual logging, so that NLog events go through the same PostSharp backend as automatic logging and share its indentation. The log source of each event is named after the NLog logger. Create the NLogLoggingBackend with a separate NLog.LogFactory whose configuration contains the output targets.
Constructors
| Name | Description |
|---|---|
| NLogCollectingTarget(string) | Initializes a new instance of the NLogCollectingTarget class. |
Methods
| Name | Description |
|---|---|
| Write(LogEventInfo) | Writes logging event to the log target. Must be overridden in inheriting classes. |