Question

I need to do some logging in my application and my Visual Studio Solution contains several dll's (and thus multiple app domains). I thought just creating a static class for my logging would work, but I found out that static classes aren't so static across app domains. From what I read, there are ways around this that require remoting/services/etc. I've also noticed free solutions such as NLog, etc. Do any of the freeware logging applications support cross domain logging easily? What would be the easiest way to implement this functionality (freeware solution, service, other..)?

Was it helpful?

Solution

Contains several dll's (and thus multiple app domains).

um no several Dll's means several assemblies. Try inspecting the results of GetAssemblies on AppDomain.CurrentDomain to see what I mean.

This means you should be able to use NLog, Log4Net, or Enterprise Library with a single Configuration with no problems.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top