Modify Java Thread Name
October 6, 2010
Part of my application generates a unique jobid for a given thread. I wanted to add that unique key to the thread name so that log4j debugging would show it, and we could work out which job the thread processed.
Here's the code I used to add the jobid to …