-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathLoupeLoggingBackend.cs
More file actions
39 lines (33 loc) · 1002 Bytes
/
LoupeLoggingBackend.cs
File metadata and controls
39 lines (33 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using PostSharp.Patterns.Diagnostics.RecordBuilders;
using PostSharp.Patterns.Diagnostics;
using PostSharp.Patterns.Diagnostics.Backends;
namespace PostSharp.Samples.Logging.Loupe
{
/// <summary>
/// Logging back-end for Loupe.
/// </summary>
[Log(AttributeExclude = true)]
public class LoupeLoggingBackend : TextLoggingBackend
{
/// <inheritdoc />
public override LogRecordBuilder CreateRecordBuilder()
{
return new LoupeLogRecordBuilder(this);
}
/// <inheritdoc />
protected override TextLoggingBackendOptions GetTextBackendOptions()
{
return this.Options;
}
/// <inheritdoc />
protected override LoggingTypeSource CreateTypeSource(LoggingNamespaceSource parent, Type type)
{
return new LoupeLoggingTypeSource(parent, type);
}
/// <summary>
/// Gets the backend options.
/// </summary>
public new LoupeLoggingBackendOptions Options { get; } = new LoupeLoggingBackendOptions();
}
}