开发者

Add additional appenders with NServiceBus Generic Host

Can anyone point me in the right direction here.

Is it possible to have separate log4net config files for each profile?

In that way I could have a produ开发者_运维百科ction.log4net.config and a lite.log4net.config?

It would be even more cool if that configuration was on top of the programmatic configuration already build into the generic host.


You'd have to override the profiles with your own, and then implement IConfigureLoggingForProfile and in there call:

NServiceBus.SetLoggingLibrary.Log4Net(() => log4net.Config.XmlConfigurator.Configure(File.OpenRead("production.log4net.config")));

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜