-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable logging/tracing #2273
Comments
pgx doesn't log anything to the console with default settings. Please check your own code for any statements that print and, if you can't find anything, please create a repo with a minimal example that reproduces the problem. |
I checked my code, did not find and print statement. Let's take this snippet from my code:
If I set a break point at this line, the console is clear. Once i hit F10, the query is printed to console, this means it must be a setting, right? |
As I said before, pgx does not log anything if you use default settings. My best guess is that you have some other logging utility configured which triggers this. |
OK, i got it, but could you tell me which setting would trigger this logging? |
Presumably, your connection https://pkg.go.dev/github.com/jackc/pgx/v5#ConnConfig has a Tracer set. |
I am working with with pgxpool v5, this is how I create the pool:
The database prints everything to console. How can I prevent it from that? I tryied to add
config.ConnConfig.Tracer = nil
, but doesn't help.The text was updated successfully, but these errors were encountered: