Updating the logger to be more tolerant of database locks.