-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate Command Messaging / Logging #1109
Comments
Hi, This seems a duplicate handler in the logging module. the only handler that's added by alembic is a null handler that will not print anywhere |
the FAILED looks like logging from your enclosing application as Alembic raises a CommandError for this case. Alembic doesn't log the exception being raised. (Edit: no, this is how msg() is designed to work: log.error() + stdout for all contingencies). it's not uncommon for logging in integrated environments to have a little bit of artifacts like this so I dont see it as much of a problem, and in any case there's no action to take on the Alembic side as the end-user can configure logging in any way they'd like. |
OK it actually prints the message with the "FAILED" prefix from the command line. regardless, that's not logging. this is an aesthetic concern and Alembic wants things in the logs for when it is integrated into larger environments. |
and similarly, when logging is not configured, if the program fails, it needs to print an error message, so not printing the FAILED message is not an option either. I will accept PRs for a -q /--quiet option |
Thanks for looking into it. That all makes sense. The quiet flag seems like a good option for people wanting to keep all messaging going through the Python logging system. |
should we re-open for this feature or a new issue would be better to track it? |
Just a PR is fine, dont need an issue for this |
CaselIT has proposed a fix for this issue in the main branch: Added quiet option to command line https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4543 |
Describe the bug
I have noticed that some alembic command messaging is duplicated where one message goes through the python logger and one around (direct to stdout).
Expected behavior
Since Alembic leans into configuring all logging via the python logger (alembic.ini), I don't think there should be any messaging that goes around that mechanism.
Of course, I am not an expert in Alembic, so I could be totally missing something.
To Reproduce
Here is a snippet from my logging config.
Versions.
The text was updated successfully, but these errors were encountered: