On Wednesday, August 17, 2016 at 1:25:17 PM UTC-4, Kent wrote:
>
> Generally, echo=True for log level of INFO is very helpful for log files.
>

If you just have a few of these, you can wrap the flush:

dbSession.add(bigObject)
try:
    # wrap `flush` in a disabled block, so we don't go crazy with logging
    logging.getLogger('sqlalchemy.engine.base.Engine').disabled = True
    dbSession.flush()
except:
    raise
finally:
    logging.getLogger('sqlalchemy.engine.base.Engine').disabled = False


If you have a lot, I believe you can use the event listening system to do 
something similar.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to