Table of Contents

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

builder ILoggingBuilder

The logging builder 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

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

builder ILoggingBuilder

The logging builder 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

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

builder ILoggingBuilder

The logging builder 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

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

builder ILoggingBuilder

The logging builder 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

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

builder ILoggingBuilder

The logging builder to configure.

progress IProgress<Status>

The progress reporter to send log messages to.

Returns

ILoggingBuilder

The logging builder.