I figured this out. I needed to programatically set up Common.Logging instead of declaratively (in the config file).
Basically, I added this line before I did my fluent bus configuration:
LogManager.Adapter = new Log4NetLoggerFactoryAdapter(new NameValueCollection { { "configType", "INLINE" } });
SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure);
And my bus logging section looks like this:
.Log4Net<ColoredConsoleAppender>(cca =>
{
cca.Layout = patternLayout;
})
.Log4Net<RollingFileAppender>(fa =>
{
fa.File = "log/handler.log";
fa.AppendToFile = true;
fa.RollingStyle = RollingFileAppender.RollingMode.Size;
fa.MaxSizeRollBackups = 5;
fa.MaximumFileSize = "1000KB";
fa.StaticLogFileName = true;
fa.Layout = patternLayout;
})
This allows me to load the logging levels in the config file, but leave the appender configuration in code as suggested by Udi (and I think it's a great idea)
I know I could of used the built in logging level of nServiceBus, but I couldn't figure out how to get fine grained control of that so that I could ignore nHibernate logging, but get all of the nServiceBus logging.
If anyone needs more guidance as to what I did, just comment here, or if you know how to get fine grained control using the nServiceBus logging level, let me know that too.