Bagikan melalui


ILoggingBuilder Interface

Definition

An interface for configuring logging providers.

public interface class ILoggingBuilder
public interface ILoggingBuilder
type ILoggingBuilder = interface
Public Interface ILoggingBuilder

Properties

Services

Gets the IServiceCollection where Logging services are configured.

Extension Methods

AddAzureWebAppDiagnostics(ILoggingBuilder, Action<AzureBlobLoggerOptions>)
AddAzureWebAppDiagnostics(ILoggingBuilder)

Adds an Azure Web Apps diagnostics logger.

AddConfiguration(ILoggingBuilder)

Adds services required to consume ILoggerProviderConfigurationFactory or ILoggerProviderConfiguration<T>

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

Adds a console logger named 'Console' to the factory.

AddConsole(ILoggingBuilder)

Adds a console logger named 'Console' to the factory.

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder, Action<TOptions>)

Adds a custom console logger formatter 'TFormatter' to be configured with options 'TOptions'.

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Adds a custom console logger formatter 'TFormatter' to be configured with options 'TOptions'.

AddJsonConsole(ILoggingBuilder, Action<JsonConsoleFormatterOptions>)

Add and configure a console log formatter named 'json' to the factory.

AddJsonConsole(ILoggingBuilder)

Add a console log formatter named 'json' to the factory with default properties.

AddSimpleConsole(ILoggingBuilder, Action<SimpleConsoleFormatterOptions>)

Add and configure a console log formatter named 'simple' to the factory.

AddSimpleConsole(ILoggingBuilder)

Add the default console log formatter named 'simple' to the factory with default properties.

AddSystemdConsole(ILoggingBuilder, Action<ConsoleFormatterOptions>)

Add and configure a console log formatter named 'systemd' to the factory.

AddSystemdConsole(ILoggingBuilder)

Add a console log formatter named 'systemd' to the factory with default properties.

AddDebug(ILoggingBuilder)

Adds a debug logger named 'Debug' to the factory.

AddEventLog(ILoggingBuilder, EventLogSettings)

Adds an event logger. Use settings to enable logging for specific LogLevels.

AddEventLog(ILoggingBuilder, Action<EventLogSettings>)

Adds an event logger. Use configure to enable logging for specific LogLevels.

AddEventLog(ILoggingBuilder)

Adds an event logger named 'EventLog' to the factory.

AddEventSourceLogger(ILoggingBuilder)

Adds an logger that writes messages to the LoggingEventSource instance.

AddFakeLogging(ILoggingBuilder, IConfigurationSection)

Configures fake logging.

AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>)

Configures fake logging.

AddFakeLogging(ILoggingBuilder)

Configures fake logging with default options.

AddFilter(ILoggingBuilder, Func<LogLevel,Boolean>)

Adds a log filter to the factory.

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

Adds a log filter to the factory.

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

Adds a log filter to the factory.

AddFilter(ILoggingBuilder, String, LogLevel)

Adds a log filter to the factory.

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

Adds a log filter to the factory.

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

Adds a log filter for the given ILoggerProvider.

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

Adds a log filter for the given ILoggerProvider.

AddFilter<T>(ILoggingBuilder, String, LogLevel)

Adds a log filter for the given ILoggerProvider.

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

Adds a log filter for the given ILoggerProvider.

AddConfiguration(ILoggingBuilder, IConfiguration)

Configures LoggerFilterOptions from an instance of IConfiguration.

AddProvider(ILoggingBuilder, ILoggerProvider)

Adds the given ILoggerProvider to the ILoggingBuilder

ClearProviders(ILoggingBuilder)

Removes all ILoggerProviders from builder.

SetMinimumLevel(ILoggingBuilder, LogLevel)

Sets a minimum LogLevel requirement for log messages to be logged.

EnableEnrichment(ILoggingBuilder, IConfigurationSection)

Enables enrichment functionality within the logging infrastructure.

EnableEnrichment(ILoggingBuilder, Action<LoggerEnrichmentOptions>)

Enables enrichment functionality within the logging infrastructure.

EnableEnrichment(ILoggingBuilder)

Enables enrichment functionality within the logging infrastructure.

EnableRedaction(ILoggingBuilder, IConfigurationSection)

Enables redaction functionality within the logging infrastructure.

EnableRedaction(ILoggingBuilder, Action<LoggerRedactionOptions>)

Enables redaction functionality within the logging infrastructure.

EnableRedaction(ILoggingBuilder)

Enables redaction functionality within the logging infrastructure.

AddTraceSource(ILoggingBuilder, SourceSwitch, TraceListener)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, SourceSwitch)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, String, TraceListener)

Adds a logger that writes to TraceSource.

AddTraceSource(ILoggingBuilder, String)

Adds a logger that writes to TraceSource.

Applies to