首页 > 解决方案 > 将 loguru 与 alembic 一起使用

问题描述

我想使用 Loguru 作为 Alembic 记录器处理程序。你知道我是否能做到以及如何做到吗?我只知道 alembic.ini 中有一些日志记录属性

现在我看到两个记录器在我的控制台中混合了一些东西:

2021-10-25 23:12:59.484 | DEBUG    | __main__:main:19 - program started
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2021-10-25 23:12:59.484 | DEBUG    | __main__:main:19 - Hello World!
2021-10-25 23:12:59.484 | DEBUG    | __main__:main:19 - program ended

标签: pythonloggingalembicloguru

解决方案


推荐阅读