@@ -810,6 +810,7 @@ def create_pool(dsn=None, *,
810
810
loop = None ,
811
811
connection_class = connection .Connection ,
812
812
record_class = protocol .Record ,
813
+ query_logging = False ,
813
814
** connect_kwargs ):
814
815
r"""Create a connection pool.
815
816
@@ -901,6 +902,10 @@ def create_pool(dsn=None, *,
901
902
An asyncio event loop instance. If ``None``, the default
902
903
event loop will be used.
903
904
905
+ :param bool query_logging:
906
+ If set, a logger named `asyncpg.query` will be created and used for
907
+ query and query argument logging for every connection created.
908
+
904
909
:param \*\*connect_kwargs:
905
910
Keyword arguments for the :func:`~asyncpg.connection.connect`
906
911
function.
@@ -934,4 +939,5 @@ def create_pool(dsn=None, *,
934
939
min_size = min_size , max_size = max_size ,
935
940
max_queries = max_queries , loop = loop , setup = setup , init = init ,
936
941
max_inactive_connection_lifetime = max_inactive_connection_lifetime ,
942
+ query_logging = query_logging ,
937
943
** connect_kwargs )
0 commit comments