r15446: Tidy up the formatting of locking debug messages and make it more