Class FrameworkProviderExtensions
- Namespace
- Microsoft.Extensions.Logging
- Assembly
- Instagile.dll
Extends ILoggingBuilder with configuration methods for built-in loggers.
public static class FrameworkProviderExtensions
- Inheritance
-
FrameworkProviderExtensions
- Inherited Members
Methods
AddLogAnalytics(ILoggingBuilder, IHttpClientFactory, string, string, string, LogLevel, bool)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggingBuilder AddLogAnalytics(this ILoggingBuilder builder, IHttpClientFactory httpClientFactory, string workspaceId, string key, string applicationName, LogLevel minLevel, bool throwExceptionsOnLogFailure = false)
Parameters
builderILoggingBuilderThe logging builder to configure.
httpClientFactoryIHttpClientFactoryCustom HttpClient configuration source.
workspaceIdstringThe Azure Log Analytics Workspace Id.
keystringThe API Key of the Azure Log Analytics endpoint
applicationNamestringA unique identifier for your application
minLevelLogLevelNo logging below this level.
throwExceptionsOnLogFailureboolIf true, failures to log are errors.
Returns
- ILoggingBuilder
The logging builder.
AddLogAnalytics(ILoggingBuilder, IHttpClientFactory, string, string, string, bool, Func<string, LogLevel, bool>?)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggingBuilder AddLogAnalytics(this ILoggingBuilder builder, IHttpClientFactory httpClientFactory, string workspaceId, string key, string applicationName, bool throwExceptionsOnLogFailure = false, Func<string, LogLevel, bool>? filter = null)
Parameters
builderILoggingBuilderThe logging builder to configure.
httpClientFactoryIHttpClientFactoryCustom HttpClient configuration source.
workspaceIdstringThe Azure Log Analytics Workspace Id.
keystringThe API Key of the Azure Log Analytics endpoint
applicationNamestringA unique identifier for your application
throwExceptionsOnLogFailureboolIf true, failures to log are errors.
filterFunc<string, LogLevel, bool>Optional. Restricts output based on log message and/or level.
Returns
- ILoggingBuilder
The logging builder.
AddLogAnalytics(ILoggingBuilder, string, string, string, LogLevel, bool)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggingBuilder AddLogAnalytics(this ILoggingBuilder builder, string workspaceId, string key, string applicationName, LogLevel minLevel, bool throwExceptionsOnLogFailure = false)
Parameters
builderILoggingBuilderThe logging builder to configure.
workspaceIdstringThe Azure Log Analytics Workspace Id.
keystringThe API Key of the Azure Log Analytics endpoint
applicationNamestringA unique identifier for your application
minLevelLogLevelNo logging below this level.
throwExceptionsOnLogFailureboolIf true, failures to log are errors.
Returns
- ILoggingBuilder
The logging builder.
AddLogAnalytics(ILoggingBuilder, string, string, string, bool, Func<string, LogLevel, bool>?)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggingBuilder AddLogAnalytics(this ILoggingBuilder builder, string workspaceId, string key, string applicationName, bool throwExceptionsOnLogFailure = false, Func<string, LogLevel, bool>? filter = null)
Parameters
builderILoggingBuilderThe logging builder to configure.
workspaceIdstringThe Azure Log Analytics Workspace Id.
keystringThe API Key of the Azure Log Analytics endpoint
applicationNamestringA unique identifier for your application
throwExceptionsOnLogFailureboolIf true, failures to log are errors.
filterFunc<string, LogLevel, bool>Optional. Restricts output based on log message and/or level.
Returns
- ILoggingBuilder
The logging builder.
AddProgress(ILoggingBuilder, IProgress<Status>)
Add reporting to an IProgress<T> to the logging pipeline.
public static ILoggingBuilder AddProgress(this ILoggingBuilder builder, IProgress<Status> progress)
Parameters
builderILoggingBuilderThe logging builder to configure.
progressIProgress<Status>The progress reporter to send log messages to.
Returns
- ILoggingBuilder
The logging builder.