LoggerFactory Class
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.
Produces instances of ILogger classes based on the specified providers.
public ref class LoggerFactory : IDisposable, Microsoft::Extensions::Logging::ILoggerFactory
public class LoggerFactory : IDisposable, Microsoft.Extensions.Logging.ILoggerFactory
type LoggerFactory = class
interface ILoggerFactory
interface IDisposable
Public Class LoggerFactory
Implements IDisposable, ILoggerFactory
- Inheritance
-
LoggerFactory
- Implements
Constructors
LoggerFactory() |
Creates a new LoggerFactory instance. |
LoggerFactory(IEnumerable<ILoggerProvider>) |
Creates a new LoggerFactory instance with the specified providers. |
LoggerFactory(IEnumerable<ILoggerProvider>, IOptionsMonitor<LoggerFilterOptions>) |
Creates a new LoggerFactory instance with the specified providers and filter option. |
LoggerFactory(IEnumerable<ILoggerProvider>, IOptionsMonitor<LoggerFilterOptions>, IOptions<LoggerFactoryOptions>) |
Creates a new LoggerFactory instance with the specified providers, filter option, and logger factory options. |
LoggerFactory(IEnumerable<ILoggerProvider>, IOptionsMonitor<LoggerFilterOptions>, IOptions<LoggerFactoryOptions>, IExternalScopeProvider) |
Creates a new LoggerFactory instance. |
LoggerFactory(IEnumerable<ILoggerProvider>, LoggerFilterOptions) |
Creates a new LoggerFactory instance with the specified providers and filter options. |
Methods
AddProvider(ILoggerProvider) |
Adds the specified provider to the collection of providers used in creating ILogger instances. |
CheckDisposed() |
Checks if the factory has been disposed. |
Create(Action<ILoggingBuilder>) |
Creates a new instance of ILoggerFactory that's configured using the provided |
CreateLogger(String) |
Creates an ILogger with the specified |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Extension Methods
AddAzureWebAppDiagnostics(ILoggerFactory) |
Obsolete.
Adds an Azure Web Apps diagnostics logger. |
AddAzureWebAppDiagnostics(ILoggerFactory, AzureAppServicesDiagnosticsSettings) |
Obsolete.
Adds an Azure Web Apps diagnostics logger. |
WithFilter(ILoggerFactory, IFilterLoggerSettings) |
Registers a wrapper logger which provides a common way to filter log messages across all registered ILoggerProviders. |
CreateLogger(ILoggerFactory, Type) |
Creates a new ILogger instance using the full name of the given |
CreateLogger<T>(ILoggerFactory) |
Creates a new ILogger instance using the full name of the given type. |
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈