Partial revert of r41018 "Wrap $log->addEntry() in transaction"