C# Class Hawkeye.Logging.log4net.Log4NetServiceFactory

This class allows for the creation of a trace service instance based on the log4net framework.
Inheritance: ILogServiceFactory, ILogServiceAppendable
Afficher le fichier Open project: odalet/Hawkeye2 Class Usage Examples

Private Properties

Свойство Type Description
ConfigureLog4Net void
CreateService ILogService
GetEntryAssembly System.Reflection.Assembly
GetRootLogger global::log4net.Core.ILogger
InitializeApplicationName string

Méthodes publiques

Méthode Description
AppendLogService ( ILogService logService, object>.IDictionary additionalData = null ) : ILogLevelThresholdSelector

Appends the specified log service to a root log service (the current instance).

GetLogger ( Type type, object>.IDictionary additionalData = null ) : ILogService

Obtains an instance of the logger service for the specified type and optional additional data.

Log4NetServiceFactory ( ) : System

Initializes a new instance of the Log4NetServiceFactory class.

Log4NetServiceFactory ( string configFile ) : System

Initializes a new instance of the Log4NetServiceFactory class.

Shutdown ( ) : void

Closes all the resources held by the various loggers.

Private Methods

Méthode Description
ConfigureLog4Net ( string filename ) : void
CreateService ( Type type ) : ILogService

Creates the logging service and return the newly created instance.

The configuration file used by log4net will be the application's configuration file (web.config ou app.exe.config) which will have to contain a <log4net> section.

GetEntryAssembly ( ) : Assembly
GetRootLogger ( ) : global::log4net.Core.ILogger
InitializeApplicationName ( ) : string

Method Details

AppendLogService() public méthode

Appends the specified log service to a root log service (the current instance).
public AppendLogService ( ILogService logService, object>.IDictionary additionalData = null ) : ILogLevelThresholdSelector
logService ILogService The log service.
additionalData object>.IDictionary The optional additional data.
Résultat ILogLevelThresholdSelector

GetLogger() public méthode

Obtains an instance of the logger service for the specified type and optional additional data.
public GetLogger ( Type type, object>.IDictionary additionalData = null ) : ILogService
type System.Type The type.
additionalData object>.IDictionary The additional data.
Résultat ILogService

Log4NetServiceFactory() public méthode

Initializes a new instance of the Log4NetServiceFactory class.
public Log4NetServiceFactory ( ) : System
Résultat System

Log4NetServiceFactory() public méthode

Initializes a new instance of the Log4NetServiceFactory class.
public Log4NetServiceFactory ( string configFile ) : System
configFile string The path to a log4net configuration file (or empty to use app.config).
Résultat System

Shutdown() public méthode

Closes all the resources held by the various loggers.
public Shutdown ( ) : void
Résultat void