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

Exception using Log4Rabbit with a project that references RabbitMQ.Client > 3.4.0 #2

Closed
PaoloLaurenti opened this issue Feb 3, 2015 · 7 comments

Comments

@PaoloLaurenti
Copy link

When using Log4Rabbit in a project that is referencing RabbitMQ.Client > 3.4.0, log4net raises an exception with the following message:

capture

@PaoloLaurenti PaoloLaurenti changed the title Exception using Log4Rabbit with a project that has to reference RabbitMQ.Client > 3.4.0 Exception using Log4Rabbit with a project that references RabbitMQ.Client > 3.4.0 Feb 3, 2015
@gimmi
Copy link
Owner

gimmi commented Feb 3, 2015

Simply upgrading RabbitMQ.Client to 3.4.3 does not reproduce the issue. Can you please post the log4net configuration?

@PaoloLaurenti
Copy link
Author

This is my appender configuration. I scrambled the values but I thing they are not important for the issue

<appender name="RabbitMQAppender" type="log4net.Appender.RabbitMQAppender, Log4Rabbit">
      <HostName value="some_host_name" />
      <VirtualHost value="some_vhost" />
      <Exchange value="some_exchange" />
      <RoutingKey value="some_routing_key" />
      <UserName value="some_username" />
      <Password value="some_password" />
    </appender>

@gimmi
Copy link
Owner

gimmi commented Feb 3, 2015

The cfg seem OK. Please try to see if you are able to reproduce the issue by using the sample logging console. Also try to add the following command at the start of your application to enable Log4Net debug:

log4net.Util.LogLog.InternalDebugging = true;

@PaoloLaurenti
Copy link
Author

I was able to almost reproduce the problem with the sample logging console but the issue is a little bit strange:

to reproduce the issue I followed this step:

  • remove log4rabbit reference inside sample logging console
  • add log4rabbit Nuget Package to LoggingConsole project
  • add RabbitMq.Client Nuget Package version 3.4.3 to LoggingConsole project

I tried also to only add RabbitMq.Client Nuget Package as above with no change to log4rabbit references. In this case I faced the following error:

screenhunter_43 feb 03 17 05

The important thing is that the version update of RabbitMQ.Client of Log4Rabbit project to 3.4.3, solves the problems.

Let me know if you agree with me and if you need a PR to fix the issue.

Thank you very much
Paolo

@gimmi
Copy link
Owner

gimmi commented Feb 3, 2015

The error shown in the last screenshot seems due to binding error with strong name assembly, for this a Add-BindingRedirect should fix. For the original problem, i didnt manage to reproduce the issue by modifying the LoggingConsole app, this is what I've tried: b2afd8d.

Anyway, releasing a new version of Log4Rabbit with updated dependencies is certainly good, so expect it in the next few days.

@PaoloLaurenti
Copy link
Author

I think that you've not been able to reproduce the problem because packages.config of Logging.Console is still referencing RabbitMQ.Client 3.0.4 instead of version 3.4.3.

screenhunter_44 feb 04 08 45

I'll try with Add-BindingRedirect and in case I'll let you know.

Anyway I agree with you that a dependencies update will be useful.

Thank you very much! :-)

@gimmi
Copy link
Owner

gimmi commented Mar 1, 2015

Just published version 0.9.0

@gimmi gimmi closed this as completed Mar 1, 2015
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

No branches or pull requests

2 participants