Die with a useful error if we can't connect to the logging DB

Instead of dying later with a message about prepare failing
Yep.