Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread Mike Bayer
On Thu, Feb 27, 2020, at 1:39 PM, doi zece wrote: > Yes I want to see the SQLs hitting the DB. The initial issue I've mentioned > got resolved. What I'm trying now is to generate more logs, so that it will > be easier for me to investigate future similar issues. > > When you say "SQL logging w

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread doi zece
Oh, found my problem. The sqlalchemy log level was not set properly for me to get the SQLs. Thanks for your support. On Thursday, February 27, 2020 at 1:39:00 PM UTC-5, doi zece wrote: > > Yes I want to see the SQLs hitting the DB. The initial issue I've > mentioned got resolved. What I'm trying

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread doi zece
Yes I want to see the SQLs hitting the DB. The initial issue I've mentioned got resolved. What I'm trying now is to generate more logs, so that it will be easier for me to investigate future similar issues. When you say "SQL logging will render all the SQL" you mean i have to configure a new

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread Mike Bayer
SQL logging will render all the SQL being emitted which should be enough to see everything the script is doing against the database. that is, if you ran op.alter_column(), you'd see "ALTER COLUMN..." in the log. not sure what else you are looking to see. do you think you're having a deadlock in

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread doi zece
OK I managed to get some logging (it seems my alembic env.py was missing the fileConfig(config.config_file_name)). But still I'm not getting what i want. Basically i want a long entry for every single operation in the migration script. And this, if possible, without having to add log statements

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread doi zece
OK I managed to get some logging (it seems my alembic env.py was missing the fileConfig(config.config_file_name)). But still I'm not getting what i want. Basically i want a long entry for every single operation in the migration script. And this, if possible, without having to add log statements

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread doi zece
I've tried that already but with no success. I also tried to change the alembic version (move to the latest one) as initially i was on a 0.8.x . Still no luck. The only way that i manage to make it print someting in the console was to add print statement in the script. This is the current s

Re: How to enable verbosity on “alembic upgrade head”?

2020-02-27 Thread Mike Bayer
the --verbose flag is only used for a command like "alembic history" to provide more detail. to see Alembic doing its work you want to enable logging. in the ini file (see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file) you want to set [logger_sqlalchemy] level to I