Logging transactions for troubleshooting