I am confused right now, and maybe does not understand the real problem.
I have an object which require logger instance to log error data.
for example
public class CommonFileSaver : IFileSaver
{
private static ILog _log = LogManager.GetLogger();
.....
}
I wish to test the logging process. And my current decission is to use the mock of the ILog interface.
At this point I have decided to use Unity to resolve dependencies.
So the line
ILog _log = LogManager.GetLogger();
will look something like
ILog _log = Resolver.Instance.Resolve<ILoger>();
The question is how to setup the Unity container to return me new instance of the ILog object using LogManager factory.
Thank you.
P.S. ILog is the log4net interface, and the whole logging thing is implemented using log4net right now.