[
https://issues.apache.org/jira/browse/LOG4NET-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017882#comment-16017882
]
Hitesh Chauhan commented on LOG4NET-565:
----------------------------------------
Thanks Dominik for quick and positive feedback. I have a custom appender to
call web api and read config settings based on application mode. I could
achieve without using IoC but that hides dependencies and tied them with the
appender. It would be nice if consumer can use any IoC framework beneath
service locator to resolve those dependencies.
this is how ServiceLocator Interface look like, consumer can implement this and
ParseAppender() use this configuration to resolve the appender in
XmlHierarchyConfigurator class
public interface IAppenderServiceLocator
{
IAppender GetInstance(Type appenderType, params string[] args);
}
I hope it provides clarity on my idea and usecase.
> Dependency Injection support appender and logger types
> ------------------------------------------------------
>
> Key: LOG4NET-565
> URL: https://issues.apache.org/jira/browse/LOG4NET-565
> Project: Log4net
> Issue Type: Improvement
> Components: Appenders, Core
> Reporter: Hitesh Chauhan
> Labels: Enhancement
>
> I have seen demand for dependency injection support in log4net. I have added
> that behavior to my local repository. And I would like to push that to
> log4net library.
> e.g. appender configuration
> <appender
> name="ServiceAppender"
> type="LoggingServiceAppender"
> serviceLocatorType="Log4NetServiceLocator">
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)