Thanks for the patch. Having it all in one piece is a bit hard to process, so I tried to separate into manageable pieces. I succeeded somewhat to split somewhat unrelated 20% of the patch and made my first commit with it (r1129909). My main edit to this part (which we may follow in the remaining parts) is replacing lazy initialization of the logger in the getter method with eager initialization to NoopJdbcEventLogger in constructor. This appears to be the most safest and non-intrusive way to add logger to most classes.
In the remaining patch (aside from what git removes automatically when rebasing against my commit), we can also remove changes to DataContext, TransactionThreadTest, UserTransactionTest that are no longer needed with the approach above.
The next thing I looked at is JdbcAdapter/JdbcActionBuilder/BaseSQLAction, which seems to be the biggest (and the only?) remaining chunk. Maybe we can also perform with NoopJdbcEventLogger setup in constructor to avoid lazy initialization of the logger... This will give us a fully committable QueryLogger port.
After that we may further refine it to perfection. The next pass (meaning a separate patch), we may avoid using "setJdbcEventLogger" and use safer constructor injection instead. This will require deeper refactoring so I don't want that to get mixed with any unrelated things.