Jan 12, 2015 at 2:43 PM
Edited Jan 12, 2015 at 2:44 PM
After spending a lot of time searching for a suitable code to change the log file name in each run of the code, I
given by Randy Levy but that uses Enterprise Library 5 and our project is built on version 6.
so the following code is not working any more and frankly speaking I am not very good at coding and getting a hard time to use all the options provided in useful websites.
Can someone please help me rewrite the following section using Enterprise Library 6 or point me towards a way to get help on this particular scenario?
Thanks in advance.
static void InitializeContainer(SerializableConfigurationSource loggingXmlConfigSource)
// Create the container
IUnityContainer container = new UnityContainer();
// Configurator will read Enterprise Library configuration
// and set up the container
UnityContainerConfigurator configurator = new UnityContainerConfigurator(container);
// Configure the container with our own custom logging
// Wrap in ServiceLocator
IServiceLocator locator = new UnityServiceLocator(container);
// And set Enterprise Library to use it
EnterpriseLibraryContainer.Current = locator;