Commit Graph

5 Commits (63422c7d6cfe092af402f48e16729acd1e3bae1c)

Author SHA1 Message Date
Jack Christensen ce66b1dae4 Fix data race with TraceLog.Config initialization
https://github.com/jackc/pgx/pull/2120
2024-09-10 07:06:39 -05:00
stringintech 216049c62b add TraceLogConfig with customizable TimeKey and ensureConfig method for default initialization 2024-07-26 22:58:14 +03:30
Vitalii Solodilov 174224fa07 The tracelog.TraceLog implements the pgx.PrepareTracer interface
Allows Tracelog to log the Prepare queiries.

Fixes #1383

Unit tests:
* added logger.Clear method to cleanup old log messages
* added logger.FilterByMsg to get only specific logs for assertions. When quieries are executed using different query exec methods prepare query can be not executed. So we can get different number of logs using different exec methods.
2022-11-19 07:43:39 -06:00
Jack Christensen 39676004de Fix logger string truncation with UTF-8
fixes #1365
2022-11-03 20:50:30 -05:00
Jack Christensen 78875bb95a Add tracing support
Replaces existing logging support. Package tracelog provides adapter for
old style logging.

https://github.com/jackc/pgx/issues/1061
2022-07-16 12:27:10 -05:00