ILoggingBuilder Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An interface for configuring logging providers.
public interface class ILoggingBuilder
public interface ILoggingBuilder
type ILoggingBuilder = interface
Public Interface ILoggingBuilder
Properties
| Name | Description |
|---|---|
| Services |
Gets the IServiceCollection where Logging services are configured. |
Extension Methods
| Name | Description |
|---|---|
|
AddAzureWebAppDiagnostics(ILoggingBuilder, Action |
Adds an Azure Web Apps diagnostics logger. |
| AddAzureWebAppDiagnostics(ILoggingBuilder) |
Adds an Azure Web Apps diagnostics logger. |
| AddConfiguration(ILoggingBuilder, IConfiguration) |
Configures LoggerFilterOptions from an instance of IConfiguration. |
| AddConfiguration(ILoggingBuilder) |
Adds services required to consume ILoggerProviderConfigurationFactory or ILoggerProviderConfiguration |
|
AddConsole(ILoggingBuilder, Action |
Adds a console logger named 'Console' to the factory. |
| AddConsole(ILoggingBuilder) |
Adds a console logger named 'Console' to the factory. |
|
AddConsoleFormatter |
Adds a custom console logger formatter 'TFormatter' to be configured with options 'TOptions'. |
|
AddConsoleFormatter |
Adds a custom console logger formatter 'TFormatter' to be configured with options 'TOptions'. |
| AddDebug(ILoggingBuilder) |
Adds a debug logger named 'Debug' to the factory. |
|
AddEventLog(ILoggingBuilder, Action |
Adds an event logger. Use |
| AddEventLog(ILoggingBuilder, EventLogSettings) |
Adds an event logger. Use |
| AddEventLog(ILoggingBuilder) |
Adds an event logger named 'EventLog' to the factory. |
| AddEventSourceLogger(ILoggingBuilder) |
Adds a logger that writes messages to the LoggingEventSource instance. |
|
AddFakeLogging(ILoggingBuilder, Action |
Configures fake logging. |
| AddFakeLogging(ILoggingBuilder, IConfigurationSection) |
Configures fake logging. |
| AddFakeLogging(ILoggingBuilder) |
Configures fake logging with default options. |
|
AddFilter(ILoggingBuilder, Func |
Adds a log filter to the factory. |
|
AddFilter(ILoggingBuilder, Func |
Adds a log filter to the factory. |
|
AddFilter(ILoggingBuilder, Func |
Adds a log filter to the factory. |
|
AddFilter(ILoggingBuilder, String, Func |
Adds a log filter to the factory. |
| AddFilter(ILoggingBuilder, String, LogLevel) |
Adds a log filter to the factory. |
|
AddFilter |
Adds a log filter for the given ILoggerProvider. |
|
AddFilter |
Adds a log filter for the given ILoggerProvider. |
|
AddFilter |
Adds a log filter for the given ILoggerProvider. |
|
AddFilter |
Adds a log filter for the given ILoggerProvider. |
|
AddGlobalBuffer(ILoggingBuilder, Action |
Adds global log buffering to the logging infrastructure. |
| AddGlobalBuffer(ILoggingBuilder, IConfiguration) |
Adds global log buffering to the logging infrastructure. |
|
AddGlobalBuffer(ILoggingBuilder, Nullable |
Adds global log buffering to the logging infrastructure. |
|
AddJsonConsole(ILoggingBuilder, Action |
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. |
| AddProvider(ILoggingBuilder, ILoggerProvider) |
Adds the given ILoggerProvider to the ILoggingBuilder |
|
AddRandomProbabilisticSampler(ILoggingBuilder, Action |
Adds Random Probabilistic logging sampler to the logging infrastructure. |
|
AddRandomProbabilisticSampler(ILoggingBuilder, Double, Nullable |
Adds Random Probabilistic logging sampler to the logging infrastructure. |
| AddRandomProbabilisticSampler(ILoggingBuilder, IConfiguration) |
Adds Random Probabilistic logging sampler to the logging infrastructure. |
| AddSampler(ILoggingBuilder, LoggingSampler) |
Adds a logging sampler instance to the logging infrastructure. |
|
AddSampler |
Adds a logging sampler type to the logging infrastructure. |
|
AddSimpleConsole(ILoggingBuilder, Action |
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 |
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. |
| AddTraceBasedSampler(ILoggingBuilder) |
Adds Trace-based logging sampler to 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. |
| ClearProviders(ILoggingBuilder) |
Removes all ILoggerProviders from |
|
EnableEnrichment(ILoggingBuilder, Action |
Enables enrichment functionality within the logging infrastructure. |
| EnableEnrichment(ILoggingBuilder, IConfigurationSection) |
Enables enrichment functionality within the logging infrastructure. |
| EnableEnrichment(ILoggingBuilder) |
Enables enrichment functionality within the logging infrastructure. |
|
EnableRedaction(ILoggingBuilder, Action |
Enables redaction functionality within the logging infrastructure. |
| EnableRedaction(ILoggingBuilder, IConfigurationSection) |
Enables redaction functionality within the logging infrastructure. |
| EnableRedaction(ILoggingBuilder) |
Enables redaction functionality within the logging infrastructure. |
| SetMinimumLevel(ILoggingBuilder, LogLevel) |
Sets a minimum LogLevel requirement for log messages to be logged. |