Skip to content

Commit 8b59d9b

Browse files
committed
Adding the logging changes to the plugin
1 parent ec1bb1e commit 8b59d9b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

nodestream_plugin_neo4j/neo4j_database.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ async def execute(
4343
database_=self.database_name,
4444
routing_=routing,
4545
)
46-
for record in result.records:
47-
if log_result:
46+
if log_result:
47+
for record in result.records:
4848
self.logger.info(
4949
"Gathered Query Results",
50-
extra=dict(**record, query=query.query_statement),
50+
extra=dict(
51+
**record,
52+
query=query.query_statement,
53+
uri=self.driver._pool.address.host
54+
),
5155
)
52-
5356
return result.records
5457

5558
def session(self) -> AsyncSession:

0 commit comments

Comments
 (0)