why exceptions are raised without logged? #1008
-
I've encountered a problem that my
without an ERROR msg, after seen the source code, I'm curious why alembic only raise error without logging it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
logging of errors using log.error() is intended to be performed when exceptions are caught, not when they are thrown. that's why Python logging includes an exc_info option; exceptions have a lot more detail when they are caught rather than thrown. Therefore if the flask-alembic module is using the Alembic API, catching an exception, and then squashing it without it being logged, that's a bug in that application and you should report it over there. |
Beta Was this translation helpful? Give feedback.
logging of errors using log.error() is intended to be performed when exceptions are caught, not when they are thrown. that's why Python logging includes an exc_info option; exceptions have a lot more detail when they are caught rather than thrown. Therefore if the flask-alembic module is using the Alembic API, catching an exception, and then squashing it without it being logged, that's a bug in that application and you should report it over there.