title: How do I identify on which thread a Lua script is running?
body: <p>I'm currently working on Lua scripts to integrate with some third party product. This third party product calls my Lua script on several threads at the same time, which is fine. However, as I write to a log file from my scripts, I'd like to identify which thread is running my Lua script and write that to the log file as well.</p>
  
  <p>This would allow me to identify which log entries belong together.</p>
  
  <p>Any thoughts on how I could make a proper distinction between log entries from different threads in Lua would be very welcome.</p>