log before we sql call perhaps.