Rqna Page 1/1

wittyexecutiveRéseaux et Communications

17 févr. 2014 (il y a 3 années et 1 mois)

573 vue(s)

NServiceBus log4Net appender
Asked by
Paddy
on 2013-02-01T05:14:48-05:00
I am having a problem with custom logging with NServiceBus.

I have set up the Configuration as described and when I get my logger the appender list is null.
Has anyone any ideas on what I am missing/doing wrong?

Cheers

My endpoint is:


public void Init() { SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure);
Configure.With().DisableTimeoutManager(); }
My app.config:





















Archives
Technology Questions and Answers
Programmers Questions and Answers
Feb 1st, 2013 Archives
Week 05, 2013 Archives
February, 2013 Archives
Tags
Nservicebus
Best Answer
Answered by
John Simons
on 2013-02-05T18:54:59-05:00
Try the following (assuming you are using
AsA_Server
as the endpoint role otherwise change it):


public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomLogging { public
void Init() { NServiceBus.SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure);
Configure.With() .DisableTimeoutManager(); } }
For more info see
https://github.com/NServiceBus/NServiceBus/tree/master/Samples/GenericHost/LoggingFromAppC
onfig

View Online
http://www.rqna.net/qna/pkuxxt-nservicebus-log4net-appender.html
Rqna
Page 1/1