From a user's perspective, SQLAlchemy's query logging seems a little too verbose and even somewhat cryptic at times:
2015-10-02 13:51:39,500 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2015-10-02 13:51:39,502 INFO sqlalchemy.engine.base.Engine SELECT anon_1.shelves_title AS anon_1_shelves_title, ..., anon_1.shelves_created_at AS anon_1_shelves_created_at, anon_1.shelves_updated_at AS anon_1_shelves_updated_at, products_1.id AS products_1_id, products_1.title AS products_1_title
FROM (SELECT shelves.title AS shelves_title, ..., shelves.created_at AS shelves_created_at, shelves.updated_at AS shelves_updated_at
FROM shelves
WHERE shelves.title = ?
LIMIT ? OFFSET ?) AS anon_1 LEFT OUTER JOIN products AS products_1 ON anon_1.shelves_title = products_1.shelf_title
2015-10-02 13:51:39,502 INFO sqlalchemy.engine.base.Engine ('sample', 1, 0)
2015-10-02 13:51:39,503 INFO sqlalchemy.engine.base.Engine ROLLBACK
(not necessarily representative, but hopefully sufficient to illustrate the issue)
Arguably Ruby on Rails is a good reference here, providing concise and colorized output of the actual database queries:
(via https://code.google.com/p/pylonsquerybar/#What_Others_Have_Done)
Is there a simple way to get similar output for SQLAlchemy? (The aforementioned Pylons Query Bar doesn't seem to be designed for framework-agnostic reuse.)
2015-10-02 13:51:39,503 INFO sqlalchemy.engine.base.Engine ROLLBACK
2015-10-02 13:51:39,500 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) ? – kain64b Nov 01 '15 at 12:26