Make Logger objects thread safe using a mutex.