Unlock the logging mutex before calling the logging callback to prevent deadlocks.