# SQL transaction rollback isn't logged!

**URL:** <https://www.ruby-forum.com/t/sql-transaction-rollback-isnt-logged/159518>\
**Category:** Rails\
**Created:** [February 5, 2009, 10:33am UTC](https://www.ruby-forum.com/t/sql-transaction-rollback-isnt-logged/159518 "2009-02-05T10:33:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/df788c/32.png) [@dgm](https://www.ruby-forum.com/u/dgm)\
**Post date:** [February 5, 2009, 10:33am UTC](https://www.ruby-forum.com/t/sql-transaction-rollback-isnt-logged/159518/1 "2009-02-05T10:33:10Z")

</div>

I’m finding that if I do something like this:

```
 X.transaction { X.create(...); raise('stop') }

```

Then I see the INSERT statement in my logs, but I don’t see the BEGIN  
or END for the transaction, or the ROLLBACK.

The transaction is definitely working: Without the raise(), the X  
object is created; with the raise(), it is not. In both cases, the  
log is identical, which makes debugging a bit confusing.

I’m using sqlite3 in development mode in an out of the box setup on a  
mac.

Is there some way I can turn up the SQL logging level to include log  
entries for transaction rollback events? Or is there some good reason  
I don’t understand why this isn’t done?
