aio-libs / aio-libs/aiopg

Fix SQL statements logging

未關閉
#522 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
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 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。