C# Класс Hawkeye.Logging.log4net.Log4NetServiceFactory

This class allows for the creation of a trace service instance based on the log4net framework.
Наследование: ILogServiceFactory, ILogServiceAppendable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ConfigureLog4Net void
CreateService ILogService
GetEntryAssembly System.Reflection.Assembly
GetRootLogger global::log4net.Core.ILogger
InitializeApplicationName string

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

AppendLogService() публичный Метод

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.
Результат ILogLevelThresholdSelector

GetLogger() публичный Метод

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.
Результат ILogService

Log4NetServiceFactory() публичный Метод

Initializes a new instance of the Log4NetServiceFactory class.
public Log4NetServiceFactory ( ) : System
Результат System

Log4NetServiceFactory() публичный Метод

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).
Результат System

Shutdown() публичный Метод

Closes all the resources held by the various loggers.
public Shutdown ( ) : void
Результат void