New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update log4net reference #13
Conversation
Add new log4net 1.12.11 libs and update reference in log4netintegration project. This solves the block for users of other packages that depend on the newer version of log4net.
log4net puts projects between a rock and a hard place. There are other projects that depend on 1.2.10 and this update would break them. To make matters worse they changed the key they sign the assembly with, so assembly redirect won't help. As such I'd rather keep things as they are |
This reverts commit ecf68ff.
As Krzysztof noted in my first pull request (and what prompted this whole exercise in the first place), log4net changed their assembly signing key in the new version so bindingRedirects in *.config files don't work. This approach creates a duplicate project, which builds Castle.Core.log4netintegration-2 which is linked to the new log4net. With this (and another NuGet package) consumers can choose which log4net integration to use so it doesn't hold back all of their other updates.
We actually ran into the signing key problem when we tried to use a bindingRedirect, otherwise I wouldn't have bothered you at all. We're specifically suffering because of TopShelf wanting a new version of log4net and the old version that we're on has some terrible memory leaks. What I've done now is make two Castle.Core.log4net assemblies with one linked against each log4net so people would be able to choose which integration to use depending on their needs. |
What if you want to use TopShelf (using 1.2.11) and NServiceBus (using 1.2.10) at the same time? The mess is the problem with log4net and I don't want to give in to this madness |
That situation will fail regardless, and there's no way around it with log4net's signing key change. Fortunately though, NServiceBus is going to do something about that by removing the dependency next month http://nservicebus.com/Roadmap.aspx . The ugly second solution at least gives an upgrade option for projects that only have Castle + one other log4net dependency (regardless of whether its 1.2.10 or 1.2.11). I agree with you that log4net created this mess, but everyone is going to have to update eventually. |
Eventually we'll probably upgrade but I don't think now would be a good time. I don't want to force people using it with log4net 1.2.10 right now to have to upgrade. Also I don't want to have two official nugets for log4net because this will create our own versioning hell. I will keep current one targeting 1.2.10 but since it's open source, feel free to create another nuget for 1.2.11 |
You might find this package useful - TopShelf integration with log4net 1.2.10. |
Close, but not quite there. TopShelf 3 removed the one feature that we On 4/14/2013 11:11 PM, Mike Chamberlain wrote:
|
I uploaded the code here, so feel to use and abuse it: |
Add new log4net 1.12.11 libs and update reference in log4netintegration
project. This solves the block for users of other packages that depend
on the newer version of log4net.