FilterLoggingBuilderExtensions.AddFilter 方法

定义

重载

AddFilter(ILoggingBuilder, Func<LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(LoggerFilterOptions, String, Func<LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(ILoggingBuilder, String, Func<LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(ILoggingBuilder, String, LogLevel)

向工厂添加日志筛选器。

AddFilter(LoggerFilterOptions, Func<String,String,LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(LoggerFilterOptions, String, LogLevel)

向工厂添加日志筛选器。

AddFilter(LoggerFilterOptions, Func<LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(ILoggingBuilder, Func<String,String,LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(ILoggingBuilder, Func<String,LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter(LoggerFilterOptions, Func<String,LogLevel,Boolean>)

向工厂添加日志筛选器。

AddFilter<T>(LoggerFilterOptions, String, LogLevel)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(ILoggingBuilder, Func<LogLevel,Boolean>)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(ILoggingBuilder, Func<String,LogLevel,Boolean>)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(LoggerFilterOptions, Func<LogLevel,Boolean>)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(LoggerFilterOptions, Func<String,LogLevel,Boolean>)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(ILoggingBuilder, String, LogLevel)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(ILoggingBuilder, String, Func<LogLevel,Boolean>)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter<T>(LoggerFilterOptions, String, Func<LogLevel,Boolean>)

为给定的 ILoggerProvider 添加日志筛选器。

AddFilter(ILoggingBuilder, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter);
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFilter (builder As ILoggingBuilder, levelFilter As Func(Of LogLevel, Boolean)) As ILoggingBuilder

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

levelFilter
Func<LogLevel,Boolean>

要添加的筛选器。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(LoggerFilterOptions, String, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, System::String ^ category, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string? category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter);
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * string * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions
<Extension()>
Public Function AddFilter (builder As LoggerFilterOptions, category As String, levelFilter As Func(Of LogLevel, Boolean)) As LoggerFilterOptions

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

levelFilter
Func<LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(ILoggingBuilder, String, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::String ^ category, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string? category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter);
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * string * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFilter (builder As ILoggingBuilder, category As String, levelFilter As Func(Of LogLevel, Boolean)) As ILoggingBuilder

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

levelFilter
Func<LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(ILoggingBuilder, String, LogLevel)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::String ^ category, Microsoft::Extensions::Logging::LogLevel level);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, Microsoft.Extensions.Logging.LogLevel level);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string? category, Microsoft.Extensions.Logging.LogLevel level);
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * string * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFilter (builder As ILoggingBuilder, category As String, level As LogLevel) As ILoggingBuilder

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

level
LogLevel

要筛选的级别。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(LoggerFilterOptions, Func<String,String,LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, Func<System::String ^, System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ filter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<string,string,Microsoft.Extensions.Logging.LogLevel,bool> filter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<string?,string?,Microsoft.Extensions.Logging.LogLevel,bool> filter);
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * Func<string, string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions
<Extension()>
Public Function AddFilter (builder As LoggerFilterOptions, filter As Func(Of String, String, LogLevel, Boolean)) As LoggerFilterOptions

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

filter
Func<String,String,LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(LoggerFilterOptions, String, LogLevel)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, System::String ^ category, Microsoft::Extensions::Logging::LogLevel level);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, Microsoft.Extensions.Logging.LogLevel level);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string? category, Microsoft.Extensions.Logging.LogLevel level);
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * string * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.LoggerFilterOptions
<Extension()>
Public Function AddFilter (builder As LoggerFilterOptions, category As String, level As LogLevel) As LoggerFilterOptions

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

level
LogLevel

要筛选的级别。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(LoggerFilterOptions, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter);
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions
<Extension()>
Public Function AddFilter (builder As LoggerFilterOptions, levelFilter As Func(Of LogLevel, Boolean)) As LoggerFilterOptions

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

levelFilter
Func<LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(ILoggingBuilder, Func<String,String,LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Func<System::String ^, System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ filter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<string,string,Microsoft.Extensions.Logging.LogLevel,bool> filter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<string?,string?,Microsoft.Extensions.Logging.LogLevel,bool> filter);
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * Func<string, string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFilter (builder As ILoggingBuilder, filter As Func(Of String, String, LogLevel, Boolean)) As ILoggingBuilder

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

filter
Func<String,String,LogLevel,Boolean>

要添加的筛选器。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(ILoggingBuilder, Func<String,LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Func<System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ categoryLevelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<string,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<string?,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter);
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * Func<string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddFilter (builder As ILoggingBuilder, categoryLevelFilter As Func(Of String, LogLevel, Boolean)) As ILoggingBuilder

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

categoryLevelFilter
Func<String,LogLevel,Boolean>

要添加的筛选器。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter(LoggerFilterOptions, Func<String,LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

向工厂添加日志筛选器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, Func<System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ categoryLevelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<string,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<string?,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter);
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * Func<string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions
<Extension()>
Public Function AddFilter (builder As LoggerFilterOptions, categoryLevelFilter As Func(Of String, LogLevel, Boolean)) As LoggerFilterOptions

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

categoryLevelFilter
Func<String,LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(LoggerFilterOptions, String, LogLevel)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, System::String ^ category, Microsoft::Extensions::Logging::LogLevel level);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, Microsoft.Extensions.Logging.LogLevel level) where T : Microsoft.Extensions.Logging.ILoggerProvider;
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string? category, Microsoft.Extensions.Logging.LogLevel level) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * string * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.LoggerFilterOptions (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As LoggerFilterOptions, category As String, level As LogLevel) As LoggerFilterOptions

类型参数

T

ILoggerProvider将为其添加此筛选器的 。

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

level
LogLevel

要筛选的级别。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(ILoggingBuilder, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As ILoggingBuilder, levelFilter As Func(Of LogLevel, Boolean)) As ILoggingBuilder

类型参数

T

ILoggerProvider将为其添加此筛选器的 。

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

levelFilter
Func<LogLevel,Boolean>

要添加的筛选器。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(ILoggingBuilder, Func<String,LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Func<System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ categoryLevelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<string,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Func<string?,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * Func<string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As ILoggingBuilder, categoryLevelFilter As Func(Of String, LogLevel, Boolean)) As ILoggingBuilder

类型参数

T

ILoggerProvider将为其添加此筛选器的 。

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

categoryLevelFilter
Func<String,LogLevel,Boolean>

要添加的筛选器。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(LoggerFilterOptions, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As LoggerFilterOptions, levelFilter As Func(Of LogLevel, Boolean)) As LoggerFilterOptions

类型参数

T

ILoggerProvider 为其添加此筛选器的 。

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

levelFilter
Func<LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(LoggerFilterOptions, Func<String,LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, Func<System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ categoryLevelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<string,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, Func<string?,Microsoft.Extensions.Logging.LogLevel,bool> categoryLevelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * Func<string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As LoggerFilterOptions, categoryLevelFilter As Func(Of String, LogLevel, Boolean)) As LoggerFilterOptions

类型参数

T

ILoggerProvider 为其添加此筛选器的 。

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

categoryLevelFilter
Func<String,LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(ILoggingBuilder, String, LogLevel)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::String ^ category, Microsoft::Extensions::Logging::LogLevel level);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, Microsoft.Extensions.Logging.LogLevel level) where T : Microsoft.Extensions.Logging.ILoggerProvider;
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string? category, Microsoft.Extensions.Logging.LogLevel level) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * string * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggingBuilder (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As ILoggingBuilder, category As String, level As LogLevel) As ILoggingBuilder

类型参数

T

ILoggerProvider 为其添加此筛选器的 。

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

level
LogLevel

要筛选的级别。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(ILoggingBuilder, String, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddFilter(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, System::String ^ category, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
public static Microsoft.Extensions.Logging.ILoggingBuilder AddFilter<T> (this Microsoft.Extensions.Logging.ILoggingBuilder builder, string? category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.ILoggingBuilder * string * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggingBuilder (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As ILoggingBuilder, category As String, levelFilter As Func(Of LogLevel, Boolean)) As ILoggingBuilder

类型参数

T

ILoggerProvider 为其添加此筛选器的 。

参数

builder
ILoggingBuilder

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

levelFilter
Func<LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于

AddFilter<T>(LoggerFilterOptions, String, Func<LogLevel,Boolean>)

Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs
Source:
FilterLoggingBuilderExtensions.cs

为给定的 ILoggerProvider 添加日志筛选器。

public:
generic <typename T>
 where T : Microsoft::Extensions::Logging::ILoggerProvider[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::LoggerFilterOptions ^ AddFilter(Microsoft::Extensions::Logging::LoggerFilterOptions ^ builder, System::String ^ category, Func<Microsoft::Extensions::Logging::LogLevel, bool> ^ levelFilter);
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
public static Microsoft.Extensions.Logging.LoggerFilterOptions AddFilter<T> (this Microsoft.Extensions.Logging.LoggerFilterOptions builder, string? category, Func<Microsoft.Extensions.Logging.LogLevel,bool> levelFilter) where T : Microsoft.Extensions.Logging.ILoggerProvider;
static member AddFilter : Microsoft.Extensions.Logging.LoggerFilterOptions * string * Func<Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.LoggerFilterOptions (requires 'T :> Microsoft.Extensions.Logging.ILoggerProvider)
<Extension()>
Public Function AddFilter(Of T As ILoggerProvider) (builder As LoggerFilterOptions, category As String, levelFilter As Func(Of LogLevel, Boolean)) As LoggerFilterOptions

类型参数

T

ILoggerProvider 为其添加此筛选器的 。

参数

builder
LoggerFilterOptions

要向其添加筛选器的 ILoggingBuilder

category
String

要筛选的类别。

levelFilter
Func<LogLevel,Boolean>

要应用的筛选器函数。

返回

ILoggingBuilder,以便可以链接其他调用。

适用于