Improved logging for transaction management