access to the log must be protected by a mutex