Open a transaction for logging purpose