I am running NServiceBus and having this issue. To try and troubleshoot it I would like to make NServiceBus log to a file.
The problem is that I am hosting NServiceBus in IIS, not NServiceBus.Host.exe. Because of that I don’t know a way to turn on the the production profile.
Is there a way to tell NServiceBus to log to a file not using profiles? (Or a way to set the profile when not using NServiceBus.Host.exe?)
I had hoped that there is a way change NServiceBus.Configure.With().Log4Net(); to put an Appender in that will log to a file. But I don’t see anyway to do that in code (all the examples use xml).
Alternatly if there is a way to change this to log to a file that would be great too:
<configSections>
<section name="Logging" type="NServiceBus.Config.Logging, NServiceBus.Core" />
</configSections>
<Logging Threshold="FINE" />
Does anyone know how to do either of these things?
Implement
IWantCustomLogging:https://github.com/NServiceBus/NServiceBus/blob/master/Samples/GenericHost/LoggingFromAppConfig/EndpointConfig.cs
And specify the RollingFileAppender in code:
Configure.Log4net< RollingFileAppender>(...)