Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log4Net with WCF Running As Service

I am running a WCF Service as Windows Service. I am having trouble getting log4net to do any actual logging

In what app.config should I place my configuration code for log4net.

The Service Host app.config the Service app.config or the underlying methods that the Service Calls?

-b

like image 518
bearrito Avatar asked Nov 14 '22 08:11

bearrito


1 Answers

I've run into design issues like this when I was writing my own logging system. An app.config for a dll assembly won't load. The executable for your app/service/etc. is what loads and ignores the dll config. You will have to either implement your own read/write/load/etc config code or just set all config values into the service's app.config (much better idea if possible).

like image 125
Jeff LaFay Avatar answered Dec 06 '22 03:12

Jeff LaFay