@@ -27,6 +27,14 @@ public static IEnumerable<MethodInfo> WriteTo
27
27
}
28
28
}
29
29
30
+ public static IEnumerable < MethodInfo > AuditTo
31
+ {
32
+ get
33
+ {
34
+ yield return GetSurrogateConfigurationMethod < LoggerAuditSinkConfiguration , ILogEventSink , LoggingLevelSwitch > ( ( c , sink , s ) => Sink ( c , sink , LevelAlias . Minimum , s ) ) ;
35
+ }
36
+ }
37
+
30
38
public static IEnumerable < MethodInfo > Filter
31
39
{
32
40
get
@@ -66,7 +74,9 @@ invocation expressions as surrogates so that SelectConfigurationMethod
66
74
has a way to match and invoke these instance methods.
67
75
*/
68
76
69
- internal static LoggerConfiguration Sink (
77
+ // .WriteTo...
78
+ // ========
79
+ static LoggerConfiguration Sink (
70
80
LoggerSinkConfiguration loggerSinkConfiguration ,
71
81
ILogEventSink sink ,
72
82
LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum ,
@@ -75,10 +85,32 @@ internal static LoggerConfiguration Sink(
75
85
return loggerSinkConfiguration . Sink ( sink , restrictedToMinimumLevel , levelSwitch ) ;
76
86
}
77
87
88
+ static LoggerConfiguration Logger (
89
+ LoggerSinkConfiguration loggerSinkConfiguration ,
90
+ Action < LoggerConfiguration > configureLogger ,
91
+ LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum ,
92
+ LoggingLevelSwitch levelSwitch = null )
93
+ => loggerSinkConfiguration . Logger ( configureLogger , restrictedToMinimumLevel , levelSwitch ) ;
94
+
95
+ // .AuditTo...
96
+ // ========
97
+ static LoggerConfiguration Sink (
98
+ LoggerAuditSinkConfiguration auditSinkConfiguration ,
99
+ ILogEventSink sink ,
100
+ LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum ,
101
+ LoggingLevelSwitch levelSwitch = null )
102
+ {
103
+ return auditSinkConfiguration . Sink ( sink , restrictedToMinimumLevel , levelSwitch ) ;
104
+ }
105
+
106
+ // .Filter...
107
+ // =======
78
108
// TODO: add overload for array argument (ILogEventEnricher[])
79
109
static LoggerConfiguration With ( LoggerFilterConfiguration loggerFilterConfiguration , ILogEventFilter filter )
80
110
=> loggerFilterConfiguration . With ( filter ) ;
81
111
112
+ // .Destructure...
113
+ // ============
82
114
// TODO: add overload for array argument (IDestructuringPolicy[])
83
115
static LoggerConfiguration With ( LoggerDestructuringConfiguration loggerDestructuringConfiguration , IDestructuringPolicy policy )
84
116
=> loggerDestructuringConfiguration . With ( policy ) ;
@@ -95,15 +127,10 @@ static LoggerConfiguration ToMaximumCollectionCount(LoggerDestructuringConfigura
95
127
static LoggerConfiguration AsScalar ( LoggerDestructuringConfiguration loggerDestructuringConfiguration , Type scalarType )
96
128
=> loggerDestructuringConfiguration . AsScalar ( scalarType ) ;
97
129
130
+ // .Enrich...
131
+ // =======
98
132
static LoggerConfiguration FromLogContext ( LoggerEnrichmentConfiguration loggerEnrichmentConfiguration )
99
133
=> loggerEnrichmentConfiguration . FromLogContext ( ) ;
100
134
101
- // Unlike the other configuration methods, Logger is an instance method rather than an extension.
102
- static LoggerConfiguration Logger (
103
- LoggerSinkConfiguration loggerSinkConfiguration ,
104
- Action < LoggerConfiguration > configureLogger ,
105
- LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum ,
106
- LoggingLevelSwitch levelSwitch = null )
107
- => loggerSinkConfiguration . Logger ( configureLogger , restrictedToMinimumLevel , levelSwitch ) ;
108
135
}
109
136
}
0 commit comments