trq-2162 Changed out stringstream for string and made the logging mutexes static so they aren't deallocated before a thread completes.
Cleaned up a the merge and fixed broken unit tests.