Is there a existing way to log each operation when running upgrade? #1344
-
Describe the use case We're having an issue where some of our revisions are intermittently failing, i.e. running The two revisions contain many Databases / Backends / Drivers targeted MySQL/pymysql Additional context I appreciate this is more of a support question than an issue, but I just assumed there would be an option to log each operations, not just each revision, but looking through the code I don't spot anything. I also searched exiting issues but nothing stood out to me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
SQLAlchemy logging in general is controlled by a Python logger called
|
Beta Was this translation helpful? Give feedback.
SQLAlchemy logging in general is controlled by a Python logger called
sqlalchemy.engine
, which when set to INFO or higher will log every SQL statement and transaction control command emitted. General info on this logger is at https://docs.sqlalchemy.org/en/20/core/engines.html#configuring-logging . Within Alembic, if you are working with a defaultalembic init
, you would go into the providedalembic.ini
and set the SQLAlchemy logger as: