I have a windows service that executes pieces of code in a new AppDomain. This AppDomain is created just for executing this pieces of code then destroyed thereafter. I am using log4net for logging purpose since I like its simplicity and flexibility. It works just fine in the default AppDomain, but logging statements inside the newly create AppDomain don't get logged. Is this a limitation within log4net or it's just that I am not setting it up right.
+1
A:
I think that should work but you need to initialize log4net for the new AppDomain. If you log to a file you may experience locking issues.
See also this question.
Stefan Egli
2010-09-20 09:47:14
Actually you are right. Since both loggers would be writing to the same file and that would definitely cause locking issues. I have already perused the link and I will try that and see whats up.
Waliaula Makokha
2010-09-20 09:59:22