LoggerFactory LoggerFactory LoggerFactory Class

Definition

Summary description for LoggerFactory

public class LoggerFactory : IDisposable, Microsoft.Extensions.Logging.ILoggerFactory
type LoggerFactory = class
    interface ILoggerFactory
    interface IDisposable
Public Class LoggerFactory
Implements IDisposable, ILoggerFactory
Inheritance
LoggerFactoryLoggerFactoryLoggerFactory
Implements

Constructors

LoggerFactory() LoggerFactory() LoggerFactory()
LoggerFactory(IEnumerable<ILoggerProvider>) LoggerFactory(IEnumerable<ILoggerProvider>) LoggerFactory(IEnumerable<ILoggerProvider>)
LoggerFactory(IEnumerable<ILoggerProvider>, LoggerFilterOptions) LoggerFactory(IEnumerable<ILoggerProvider>, LoggerFilterOptions) LoggerFactory(IEnumerable<ILoggerProvider>, LoggerFilterOptions)
LoggerFactory(IEnumerable<ILoggerProvider>, IOptionsMonitor<LoggerFilterOptions>) LoggerFactory(IEnumerable<ILoggerProvider>, IOptionsMonitor<LoggerFilterOptions>) LoggerFactory(IEnumerable<ILoggerProvider>, IOptionsMonitor<LoggerFilterOptions>)

Methods

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

Check if the factory has been disposed.

Create(Action<ILoggingBuilder>) Create(Action<ILoggingBuilder>) Create(Action<ILoggingBuilder>)

Creates new instance of ILoggerFactory configured using provided configure delegate.

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

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