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)

Adds an Azure Web Apps diagnostics logger.

AddConfiguration(ILoggingBuilder)

Adds services required to consume ILoggerProviderConfigurationFactory or ILoggerProviderConfiguration<T>.

AddConsole(ILoggingBuilder)

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

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

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

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

Adds a custom console logger formatter.

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

Adds a custom console logger formatter to be configured with the specified options.

AddJsonConsole(ILoggingBuilder)

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

AddJsonConsole(ILoggingBuilder, Action<JsonConsoleFormatterOptions>)

Adds a console log formatter named 'json' to the factory configured with the specified Json console formatter options.

AddSimpleConsole(ILoggingBuilder)

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

AddSimpleConsole(ILoggingBuilder, Action<SimpleConsoleFormatterOptions>)

Adds a console log formatter named 'simple' to the factory configured with the specified simple console formatter options.

AddSystemdConsole(ILoggingBuilder)

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

AddSystemdConsole(ILoggingBuilder, Action<ConsoleFormatterOptions>)

Adds a console log formatter named 'systemd' to the factory configured with the specified console formatter options.

AddDebug(ILoggingBuilder)

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

AddEventLog(ILoggingBuilder)

Adds an event logger named 'EventLog' 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.

AddEventSourceLogger(ILoggingBuilder)

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

AddFakeLogging(ILoggingBuilder)

Configures fake logging with default options.

AddFakeLogging(ILoggingBuilder, IConfigurationSection)

Configures fake logging.

AddFakeLogging(ILoggingBuilder, Action<FakeLogCollectorOptions>)

Configures fake logging.

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 logger filter options from an instance of IConfiguration.

AddProvider(ILoggingBuilder, ILoggerProvider)

Adds the given ILoggerProvider to the ILoggingBuilder so that calls can be chained.

ClearProviders(ILoggingBuilder)

Removes all logger providers from builder.

SetMinimumLevel(ILoggingBuilder, LogLevel)

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

EnableEnrichment(ILoggingBuilder)

Enables enrichment functionality within the logging infrastructure.

EnableEnrichment(ILoggingBuilder, IConfigurationSection)

Enables enrichment functionality within the logging infrastructure.

EnableEnrichment(ILoggingBuilder, Action<LoggerEnrichmentOptions>)

Enables enrichment functionality within the logging infrastructure.

EnableRedaction(ILoggingBuilder)

Enables redaction 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.

AddTraceSource(ILoggingBuilder, SourceSwitch)

Adds a TraceSource logger named 'TraceSource' to the factory.

AddTraceSource(ILoggingBuilder, SourceSwitch, TraceListener)

Adds a TraceSource logger named 'TraceSource' to the factory.

AddTraceSource(ILoggingBuilder, String)

Adds a TraceSource logger named 'TraceSource' to the factory.

AddTraceSource(ILoggingBuilder, String, TraceListener)

Adds a TraceSource logger named 'TraceSource' to the factory.

Applies to