With debug logging enabled this method would take a lock and then format the lock as a string. Since PR #4022 landed the string formatting method has also taken the lock, so this deadlocks. Instead just record the lock ID, as is done elsewhere.