In our project we need to transmit the client side logging to a server. Server-side, we created a WCF service that can receive the logging lines and dump them into a flat file/xml file/database (not important). Client-side, we created a RemoteTraceListener (with attributes to configure the endpoint, etc) calling that logging service. We use the standard .Net tracing with trace sources (TraceData, TraceEvent) to create the logging.
Now, this all goes well, unless we hook up the RemoteTraceListener to the "System.ServiceModel" trace source at the client to investigate other service calls. This obviously goes very wrong.
And after that, the messages just keep flooding. Ideas on solving this recursion, please?
After thorough searching, the possible solutions split itself in three categories:
We chose to follow the last method. We have rewritten our TraceListener to write internally to a queue. Internally a second AppDomain is started, dequeuing and transmitting the logging to the server. This can be written in half a day.