log now uses a mutex.