ILoggerFactory ILoggerFactory ILoggerFactory Interface

Definition

Represents a type used to configure the logging system and create instances of ILogger from the registered ILoggerProviders.

public interface ILoggerFactory : IDisposable
type ILoggerFactory = interface
    interface IDisposable
Public Interface ILoggerFactory
Implements IDisposable
Derived
Implements

Methods

AddProvider(ILoggerProvider) AddProvider(ILoggerProvider) AddProvider(ILoggerProvider)

Adds an ILoggerProvider to the logging system.

CreateLogger(String) CreateLogger(String) CreateLogger(String)

Creates a new ILogger instance.

Extension Methods

AddAzureWebAppDiagnostics(ILoggerFactory) AddAzureWebAppDiagnostics(ILoggerFactory) AddAzureWebAppDiagnostics(ILoggerFactory)

Adds an Azure Web Apps diagnostics logger.

AddAzureWebAppDiagnostics(ILoggerFactory, AzureAppServicesDiagnosticsSettings) AddAzureWebAppDiagnostics(ILoggerFactory, AzureAppServicesDiagnosticsSettings) AddAzureWebAppDiagnostics(ILoggerFactory, AzureAppServicesDiagnosticsSettings)

Adds an Azure Web Apps diagnostics logger.

AddConsole(ILoggerFactory) AddConsole(ILoggerFactory) AddConsole(ILoggerFactory)

Adds a console logger that is enabled for LogLevel.Information or higher.

AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration)
AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings)
AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel)

Adds a console logger that is enabled for LogLevels of minLevel or higher.

AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean)

Adds a console logger that is enabled for LogLevels of minLevel or higher.

AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean)

Adds a console logger that is enabled for LogLevel.Information or higher.

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>)

Adds a console logger that is enabled as defined by the filter function.

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean)

Adds a console logger that is enabled as defined by the filter function.

AddDebug(ILoggerFactory) AddDebug(ILoggerFactory) AddDebug(ILoggerFactory)

Adds a debug logger that is enabled for LogLevel.Information or higher.

AddDebug(ILoggerFactory, LogLevel) AddDebug(ILoggerFactory, LogLevel) AddDebug(ILoggerFactory, LogLevel)

Adds a debug logger that is enabled for LogLevels of minLevel or higher.

AddDebug(ILoggerFactory, Func<String,LogLevel,Boolean>) AddDebug(ILoggerFactory, Func<String,LogLevel,Boolean>) AddDebug(ILoggerFactory, Func<String,LogLevel,Boolean>)

Adds a debug logger that is enabled as defined by the filter function.

AddEventLog(ILoggerFactory) AddEventLog(ILoggerFactory) AddEventLog(ILoggerFactory)

Adds an event logger that is enabled for LogLevel.Information or higher.

AddEventLog(ILoggerFactory, EventLogSettings) AddEventLog(ILoggerFactory, EventLogSettings) AddEventLog(ILoggerFactory, EventLogSettings)

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

AddEventLog(ILoggerFactory, LogLevel) AddEventLog(ILoggerFactory, LogLevel) AddEventLog(ILoggerFactory, LogLevel)

Adds an event logger that is enabled for LogLevels of minLevel or higher.

AddEventSourceLogger(ILoggerFactory) AddEventSourceLogger(ILoggerFactory) AddEventSourceLogger(ILoggerFactory)

Adds an event logger that is enabled for LogLevel.Information or higher.

WithFilter(ILoggerFactory, IFilterLoggerSettings) WithFilter(ILoggerFactory, IFilterLoggerSettings) WithFilter(ILoggerFactory, IFilterLoggerSettings)

Registers a wrapper logger which provides a common way to filter log messages across all registered ILoggerProviders.

CreateLogger(ILoggerFactory, Type) CreateLogger(ILoggerFactory, Type) CreateLogger(ILoggerFactory, Type)

Creates a new ILogger instance using the full name of the given type.

CreateLogger<T>(ILoggerFactory) CreateLogger<T>(ILoggerFactory) CreateLogger<T>(ILoggerFactory)

Creates a new ILogger instance using the full name of the given type.

AddTraceSource(ILoggerFactory, SourceSwitch) AddTraceSource(ILoggerFactory, SourceSwitch) AddTraceSource(ILoggerFactory, SourceSwitch)
AddTraceSource(ILoggerFactory, SourceSwitch, TraceListener) AddTraceSource(ILoggerFactory, SourceSwitch, TraceListener) AddTraceSource(ILoggerFactory, SourceSwitch, TraceListener)
AddTraceSource(ILoggerFactory, String) AddTraceSource(ILoggerFactory, String) AddTraceSource(ILoggerFactory, String)
AddTraceSource(ILoggerFactory, String, TraceListener) AddTraceSource(ILoggerFactory, String, TraceListener) AddTraceSource(ILoggerFactory, String, TraceListener)

Applies to