Table of Contents

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

factory ILoggerFactory

The logger factory to configure.

httpClientFactory IHttpClientFactory

Custom HttpClient configuration source.

workspaceId string

The Azure Log Analytics Workspace Id.

key string

The API Key of the Azure Log Analytics endpoint

applicationName string

A unique identifier for your application

minLevel LogLevel

No logging below this level.

throwExceptionsOnLogFailure bool

If 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

factory ILoggerFactory

The logger factory to configure.

httpClientFactory IHttpClientFactory

Custom HttpClient configuration source.

workspaceId string

The Azure Log Analytics Workspace Id.

key string

The API Key of the Azure Log Analytics endpoint

applicationName string

A unique identifier for your application

throwExceptionsOnLogFailure bool

If true, failures to log are errors.

filter Func<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

factory ILoggerFactory

The logger factory to configure.

workspaceId string

The Azure Log Analytics Workspace Id.

key string

The API Key of the Azure Log Analytics endpoint

applicationName string

A unique identifier for your application

minLevel LogLevel

No logging below this level.

throwExceptionsOnLogFailure bool

If 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

factory ILoggerFactory

The logger factory to configure.

workspaceId string

The Azure Log Analytics Workspace Id.

key string

The API Key of the Azure Log Analytics endpoint

applicationName string

A unique identifier for your application

throwExceptionsOnLogFailure bool

If true, failures to log are errors.

filter Func<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

factory ILoggerFactory
progress IProgress<Status>

Returns

ILoggerFactory