When to use ‘nested diagnostic context’ (NDC)?
Want an example? Take the following Web API written using ASP.NET MVC4: // GET api/HypervResource public string Get() { logger.Debug(“Start of service test”); System.Threading.Thread.Sleep(5000); // simulate work logger.Debug(“End of service test”); return “HypervResource controller running, use POST to send JSON encoded RPCs”; } When server concurrent HTTP Requests are made, the logging can get interleaved. … Read more