Skip to content

Is there a existing way to log each operation when running upgrade? #1344

Discussion options

You must be logged in to vote

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 default alembic init, you would go into the provided alembic.ini and set the SQLAlchemy logger as:

[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@notatallshaw-gts
Comment options

Answer selected by notatallshaw-gts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Converted from issue

This discussion was converted from issue #1343 on November 06, 2023 17:56.