草庐IT

LoggingConnection

全部标签

python - 我如何使用 Psycopg2 的 LoggingConnection?

我想记录psycopg2进行的查询,但是psycopg2documentation并没有真正指定应该如何使用LoggingConnection。importloggingfrompsycopg2.extrasimportLoggingConnectiondb_settings={"user":"abcd","password":"efgh","host":"postgres.db","database":"dev",}conn=LoggingConnection(**db_settings)报错LoggingConnection(**db_settings)TypeError:func