title: How to setup a non global NLog custom layout renderer not bound to a specific thread?
body: <p>I have a job engine, which runs  several jobs in parallel. The jobs may be multithreaded themselves.</p>
  
  <p>There is a job specific information I would like to expose via custom layout renderers. The solutions I have seen so far suggest using either of GDC, NDC or MDC facilities. For example - <a href="http://nlog-forum.1685105.n2.nabble.com/Custom-Layout-Renderers-Runtime-Values-td4065731.html" rel="nofollow">http://nlog-forum.1685105.n2.nabble.com/Custom-Layout-Renderers-Runtime-Values-td4065731.html</a></p>
  
  <p>This approach is not good, because the information I want to expose is per job, which is neither global nor thread local. A job execution may involve different threads, from the thread pool and/or explicitly created.</p>
  
  <p>I want to make as less as possible changes to the existing job code. For instance, I understand I might need to change how the log instances are obtained or life scoped (instance vs static), but I certainly do not want to change the log messages.</p>
  
  <p>Any ideas?</p>