Interface ILogFactory
Log factory abstraction. Inject this interface into your class, if you need something to log.
public interface ILogFactory : IDisposable
- Inherited Members
- Extension Methods
Methods
AddProvider(ILoggerProvider)
Adds an ILoggerProvider to the logging system.
void AddProvider(ILoggerProvider provider)
Parameters
provider
ILoggerProviderThe ILoggerProvider.
CreateLog<TComponent>(TComponent)
Creates the log for the component. Call this method right in the ctor of class, which need to log something, and keep obtained log as private filed of your class.
ILog CreateLog<TComponent>(TComponent component)
Parameters
component
TComponentComponent instance. Just pass this.
Returns
Type Parameters
TComponent
Type of the component
CreateLog<TComponent>(TComponent, string)
Creates the log for the component. Call this method right in the ctor of class, which need to log something, and keep obtained log as private filed of your class.
ILog CreateLog<TComponent>(TComponent component, string componentNameSuffix)
Parameters
component
TComponentComponent instance. Just pass this.
componentNameSuffix
stringSuffix of the component name.
Returns
Type Parameters
TComponent
Type of the component