Address thread safety in TaskTracer logging.