Skip to content

Instantly share code, notes, and snippets.

@ramonsmits
Created February 5, 2016 10:04
Show Gist options
  • Select an option

  • Save ramonsmits/f5a341ada45bf1282ed3 to your computer and use it in GitHub Desktop.

Select an option

Save ramonsmits/f5a341ada45bf1282ed3 to your computer and use it in GitHub Desktop.
Use log4net with NServiceBus using log4net xml configuration in application configuration file
//
// Run this before anything NServiceBus related. If using
// the host, put this in the constructor of the endpoint
// configuration class.
//
log4net.Config.XmlConfigurator.Configure();
NServiceBus.Logging.LogManager.Use<NServiceBus.Log4Net.Log4NetFactory>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment