Class FrameworkProviderExtensions
- Namespace
- Microsoft.Extensions.Logging
- Assembly
- Instagile.dll
Extends ILoggerFactory with configuration methods for built-in loggers.
public static class FrameworkProviderExtensions
- Inheritance
-
FrameworkProviderExtensions
- Inherited Members
Methods
AddLogAnalytics(ILoggerFactory, IHttpClientFactory, string, string, string, LogLevel, bool)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggerFactory AddLogAnalytics(this ILoggerFactory factory, IHttpClientFactory httpClientFactory, string workspaceId, string key, string applicationName, LogLevel minLevel, bool throwExceptionsOnLogFailure = false)
Parameters
factoryILoggerFactoryThe logger factory 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
- ILoggerFactory
The logger factory.
AddLogAnalytics(ILoggerFactory, IHttpClientFactory, string, string, string, bool, Func<string, LogLevel, bool>?)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggerFactory AddLogAnalytics(this ILoggerFactory factory, IHttpClientFactory httpClientFactory, string workspaceId, string key, string applicationName, bool throwExceptionsOnLogFailure = false, Func<string, LogLevel, bool>? filter = null)
Parameters
factoryILoggerFactoryThe logger factory 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
- ILoggerFactory
The logger factory.
AddLogAnalytics(ILoggerFactory, string, string, string, LogLevel, bool)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggerFactory AddLogAnalytics(this ILoggerFactory factory, string workspaceId, string key, string applicationName, LogLevel minLevel, bool throwExceptionsOnLogFailure = false)
Parameters
factoryILoggerFactoryThe logger factory 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
- ILoggerFactory
The logger factory.
AddLogAnalytics(ILoggerFactory, string, string, string, bool, Func<string, LogLevel, bool>?)
Add Azure LogAnalytics to the logging pipeline.
public static ILoggerFactory AddLogAnalytics(this ILoggerFactory factory, string workspaceId, string key, string applicationName, bool throwExceptionsOnLogFailure = false, Func<string, LogLevel, bool>? filter = null)
Parameters
factoryILoggerFactoryThe logger factory 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
- ILoggerFactory
The logger factory.
AddProgress(ILoggerFactory, IProgress<Status>)
Add reporting to an IProgress<T> to the logging pipeline.
public static ILoggerFactory AddProgress(this ILoggerFactory factory, IProgress<Status> progress)
Parameters
factoryILoggerFactoryprogressIProgress<Status>