Fix SQL statements logging
未關閉
enhancement
- 主要語言
- Python
- 星號
- 1.4k
- 分支
- 170
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I suggest to remove weird `echo` flag because it's behavior is confusing. There is similar flag in SQLAlchemy for instance and it's behavior is the following: "if you don't want to setup your own logging, then specify `echo=True` and library will add handler for internal logger which outputs logs automatically, but if you setup loggers manually, then you don't need `echo` flag and logging just works" (https://github.com/sqlalchemy/sqlalchemy/blob/4aadcca993ce30c25b09679178907991b4430b2e/lib/sqlalchemy/log.py#L94-L97).
In case of `aiopg` it's simply:
https://github.com/aio-libs/aiopg/blob/57b5d55b3593ed6c6d8507d33a8bf1e0300fce84/aiopg/cursor.py#L109-L111
貢獻指南
評估
這個 Issue 還沒有評估資料。