Class LoggerFactory
A logger factory.
Inheritance
System.Object
LoggerFactory
Implements
Microsoft.Extensions.Logging.ILoggerFactory
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Application.AspNetCore.Logging
Assembly: Kephas.Application.AspNetCore.dll
Syntax
public class LoggerFactory : ILoggerFactory, IDisposable
Constructors
| Improve this Doc View SourceLoggerFactory(ILogManager)
Initializes a new instance of the LoggerFactory class.
Declaration
public LoggerFactory(ILogManager logManager)
Parameters
Type | Name | Description |
---|---|---|
ILogManager | logManager | The log manager. |
Methods
| Improve this Doc View SourceAddProvider(ILoggerProvider)
Adds an Microsoft.Extensions.Logging.ILoggerProvider to the logging system.
Declaration
public void AddProvider(ILoggerProvider provider)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILoggerProvider | provider | The Microsoft.Extensions.Logging.ILoggerProvider. |
CreateLogger(String)
Creates a new Microsoft.Extensions.Logging.ILogger instance.
Declaration
public ILogger CreateLogger(string categoryName)
Parameters
Type | Name | Description |
---|---|---|
System.String | categoryName | The category name for messages produced by the logger. |
Returns
Type | Description |
---|---|
Microsoft.Extensions.Logging.ILogger | The Microsoft.Extensions.Logging.ILogger. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Implements
Microsoft.Extensions.Logging.ILoggerFactory
System.IDisposable