Friday, 23 August 2013

WCF Restful web service. Logging request processing

WCF Restful web service. Logging request processing

For example, I have a RESTful web-service with only one operation Process
which uses a lot of other methods from different assemblies. The service
is supposed to log incoming request processing events (I am using log4net
library and log messages into a text file). I am wondering how to ensure
correct logging messages order in a log file in case of simultaneous
queries (from different processes, single processes with a lot of
asynchronous tasks). Is there any way to identify particular request
during processing on server? I could prefix every log message with some ID
in that case... I don't want to extend query itself with additional info.

No comments:

Post a Comment