I assume you're using EntLib 4.1 based on the config you posted. In the 4.1 version, the Logger class explicitly uses the LogWriter class which is a concrete class thus, you cannot configure it to use a different one. In version 5.0
though, this is possible since it is now an abstract class. You would use the same registration:
<register type="Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
mapTo="Hsb.EnterpriseLibrary.Logging.AsynchronousLogWriter, Hsb.EnterpriseLibrary.Logging" />
You would then need to load the container from the config and replace the EnterpriseLibraryContainer.Current object:
IUnityContainer container = new UnityContainer();
EnterpriseLibraryContainer.Current = new UnityServiceLocator(container);
Global Technologies & Solutions