Question

I am using the following code from castle windsor documentation. I can't figure out how to pass in my configFile on my bootstrapper container installer that installs this installer.

 public void Install(IWindsorContainer container, IConfigurationStore store)
    {
        container.AddFacility<LoggingFacility>(f => f.UseLog4Net("NameOfConfigFile"));
    }
Was it helpful?

Solution 2

The only way I have been able to do this is by newing up my installer and passing in the NameOfConfigFile and in the constructor of my installer setting a private instance field to this value.

_bootStrapContainer = new WindsorContainer().Install(new LoggerInstaller(configPath));

OTHER TIPS

By default I believe it will use a logging.config on the root of the project. Do you still need to use something more customized than that?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top