@@ -27,6 +27,14 @@ public static IEnumerable<MethodInfo> WriteTo
2727 }
2828 }
2929
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+
3038 public static IEnumerable < MethodInfo > Filter
3139 {
3240 get
@@ -66,7 +74,9 @@ invocation expressions as surrogates so that SelectConfigurationMethod
6674 has a way to match and invoke these instance methods.
6775 */
6876
69- internal static LoggerConfiguration Sink (
77+ // .WriteTo...
78+ // ========
79+ static LoggerConfiguration Sink (
7080 LoggerSinkConfiguration loggerSinkConfiguration ,
7181 ILogEventSink sink ,
7282 LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum ,
@@ -75,10 +85,32 @@ internal static LoggerConfiguration Sink(
7585 return loggerSinkConfiguration . Sink ( sink , restrictedToMinimumLevel , levelSwitch ) ;
7686 }
7787
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+ // =======
78108 // TODO: add overload for array argument (ILogEventEnricher[])
79109 static LoggerConfiguration With ( LoggerFilterConfiguration loggerFilterConfiguration , ILogEventFilter filter )
80110 => loggerFilterConfiguration . With ( filter ) ;
81111
112+ // .Destructure...
113+ // ============
82114 // TODO: add overload for array argument (IDestructuringPolicy[])
83115 static LoggerConfiguration With ( LoggerDestructuringConfiguration loggerDestructuringConfiguration , IDestructuringPolicy policy )
84116 => loggerDestructuringConfiguration . With ( policy ) ;
@@ -95,15 +127,10 @@ static LoggerConfiguration ToMaximumCollectionCount(LoggerDestructuringConfigura
95127 static LoggerConfiguration AsScalar ( LoggerDestructuringConfiguration loggerDestructuringConfiguration , Type scalarType )
96128 => loggerDestructuringConfiguration . AsScalar ( scalarType ) ;
97129
130+ // .Enrich...
131+ // =======
98132 static LoggerConfiguration FromLogContext ( LoggerEnrichmentConfiguration loggerEnrichmentConfiguration )
99133 => loggerEnrichmentConfiguration . FromLogContext ( ) ;
100134
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 ) ;
108135 }
109136}
0 commit comments