Question

I am trying to use EL 5.0 with prism.

As part of the bootstrapper process - I create the Logger Facade adapter- which uses following code for logging...

var logwriter = EnterpriseLibraryContainer.Current.GetInstance<LogWriter>();     
logwriter.Write(message, category.ToString(), (int)priority);

While the bootstrapper is in process some amount of logging is done by the framework.. and starts writing on to a file...

as part of the ConfigureContainer() , I register the EnterpriseLibraryContainer to use my unity container.

var configurator = new UnityContainerConfigurator(Container); 
// Read the configuration files and set up the container.         
EnterpriseLibraryContainer.ConfigureContainer(configurator, ConfigurationSourceFactory.Create());            

at this stage - any subsequent logging (through exception handling block) to the same logging Target Listener are getting written to a new file (increment file) because the earlier file is held by a different instance

Could any one please assist me in the same?

Was it helpful?

Solution

I was able to resolve this with some help from EnterpriseLib support... here is the link

http://entlib.codeplex.com/discussions/395614

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