title: How do I implement logging on a per-thread basis?
body: <p>I want to get the logs from an individual thread into a specific file that only contains logs from that thread.</p>
  <p>In most cases, it would be totally satisfactory to just log from all threads into a single file. This will not work for me. I am applying a concurrent model to a large and currently iterative code base that has logging implemented all over the place in different modules, and I am trying to change as little code as possible.</p>
  <p>I can think of several solutions that just seem a bit hacky that involve detecting if the current code is executing in a thread, so I am wondering if there is a nice Pythonic way to do this.</p>