aiopg icon indicating copy to clipboard operation
aiopg copied to clipboard

Fix SQL statements logging

Open decaz opened this issue 6 years ago • 1 comments

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

decaz avatar Dec 21 '18 14:12 decaz

GitMate.io thinks possibly related issues are https://github.com/aio-libs/aiopg/issues/78 (SQL statements logging), https://github.com/aio-libs/aiopg/issues/13 (Process cancellation of sql request), https://github.com/aio-libs/aiopg/issues/388 (Add Logging When Pool is full), https://github.com/aio-libs/aiopg/issues/18 (Fix a bug in connection pool), and https://github.com/aio-libs/aiopg/issues/14 (Fix a bug in aiopg pool).

aio-libs-bot avatar Dec 21 '18 14:12 aio-libs-bot