Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Conversation

galiven
Copy link

@galiven galiven commented Jul 13, 2012

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.

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.
@kkozmic
Copy link
Contributor

kkozmic commented Jul 13, 2012

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

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.
@galiven
Copy link
Author

galiven commented Jul 14, 2012

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.

@kkozmic
Copy link
Contributor

kkozmic commented Jul 14, 2012

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

@galiven
Copy link
Author

galiven commented Jul 16, 2012

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.

@kkozmic
Copy link
Contributor

kkozmic commented Jul 17, 2012

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

@kkozmic kkozmic closed this Oct 10, 2012
@mikechamberlain
Copy link

You might find this package useful - TopShelf integration with log4net 1.2.10.

https://nuget.org/packages/TopShelf.OldLog4NetIntegration/

@galiven
Copy link
Author

galiven commented Apr 15, 2013

Close, but not quite there. TopShelf 3 removed the one feature that we
actually use, multiple services handled by the directory monitor (see
the very bottom of
http://docs.topshelf-project.com/en/latest/configuration/quickstart.html),
and the 2.3.0.0 base product still has a direct dependency on log4net.
They said it was brittle so we gave it up on production and just run
individual services, but it's still useful on a developer box. I see
somebody has put out a version of castle.core.log4net
(https://nuget.org/packages/Castle.Core-log4net1211/) that works with
new log4net, but we need castle.windsor.log4net too. Maybe next time I
get a minute I'll try to write that conversion and ask cconstantin to
put it up on NuGet too. Thanks for the link though.

On 4/14/2013 11:11 PM, Mike Chamberlain wrote:

You might find this package useful - TopShelf integration with log4net
1.2.10.

https://nuget.org/packages/TopShelf.OldLog4NetIntegration/


Reply to this email directly or view it on GitHub
#13 (comment).

@mikechamberlain
Copy link

I uploaded the code here, so feel to use and abuse it:

https://github.com/chambem9/TopShelf.OldLog4NetIntegration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants