Closed s-krawczyk closed 7 years ago
For me it's is important to remove dependency from log4net same as NUnit. We would like to use this library but in whole system we use log4net 1.2.10 not version 2. So the best is to use logging tools from framework and not making dependencies to any other libs. Other solution is to make Dependency Injection of some logger which will implement some ILogging interface. I choosen first solution to make it to use system.diagnostics. My second step is to make integration library with NUnit and core lib without it. Main aim is to remove any dependencies that I can flexibly exchange versions of components which we use without need to rebuild whole core HttpMock lib. What You think about it?
Pozdrawiam SK
2016-09-30 18:49 GMT+02:00 Hibri Marzook notifications@github.com:
@hibri commented on this pull request.
Thanks for this :) This is a breaking change. I plan to remove the log4net depedency for the dotnet core version. This may break feedback for people who are relying on the output from log4net. Lo4net can be used with the TraceListener was well.
I'd like to see the log out put configurable, as it can be too much to read. I prefer to turn it on only when there is an issue to debug.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hibri/HttpMock/pull/58#pullrequestreview-2361517, or mute the thread https://github.com/notifications/unsubscribe-auth/AI9eTwuICvkIZ0rETF33kl7PAPYEoQihks5qvT2KgaJpZM4KKbIO .
Hi @s-krawczyk I don't disagree with your reasoning :) It's more around how to manage the change.
Could you do a few more changes, please ?
Can you move the logging setup to https://github.com/hibri/HttpMock/blob/master/src/HttpMock/HttpMockRepository.cs So that you have to do it only once. Multiple instances of an HttpServer can be spun up.
Could you also make the logging configurable ? Just on or off would suffice for now.
How about using something like common.logging instead? https://github.com/net-commons/common-logging
Removed dependency from log4net. Library now can be used with standard System.Diagnostic.Trace/Debug. By default it adds ConsoleTraceWriter.