pgcat
pgcat copied to clipboard
query_logger plugin duplication output the SQL
Describe the bug
I run select 1; query from client, and the pgcat output tow:
2024-12-27T07:37:19.360566Z INFO ThreadId(07) pgcat::plugins::query_logger: [pool: db_name][user: db_user] SELECT 1
2024-12-27T07:37:19.369002Z INFO ThreadId(07) pgcat::plugins::query_logger: [pool: db_name][user: db_user] SELECT 1
To Reproduce
The code at the client.rs:
the first output
https://github.com/postgresml/pgcat/blob/3202f5685b2c9017b59f1374977f37aa3fd3c93a/src/client.rs#L952
the second output
https://github.com/postgresml/pgcat/blob/3202f5685b2c9017b59f1374977f37aa3fd3c93a/src/client.rs#L1232
Expected behavior I think run the one query and out put one SQL log. I try to audit the query with the output, the duplication logs impact on the collection and use of log systems.