Skip to content
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

Make logging configurable #44

Closed
MDrollette opened this issue Sep 7, 2016 · 7 comments
Closed

Make logging configurable #44

MDrollette opened this issue Sep 7, 2016 · 7 comments

Comments

@MDrollette
Copy link

When using the proxy with PHP (and no persistent connections) the chattiness of the proxy logs is overwhelming. Since I am running the proxy on Container Engine, those logs are being shipped to Cloud Logging and the amount of "new connection" and "connection closed" messages is significant.

It would be nice to disable logging of new and closed connections.

@Carrotman42
Copy link
Contributor

Sure, that makes a lot of sense.

But please note: you really /should/ be pooling connections. Particularly with the proxy, dialing new database connections is significantly less efficient than using existing connections.

@olivierboucher
Copy link

I could submit a pull request if you can tell me which logging library you would like to use.

@Carrotman42
Copy link
Contributor

Carrotman42 commented Jun 6, 2017 via email

@olivierboucher
Copy link

Thanks, will submit a PR soon

olivierboucher pushed a commit to olivierboucher/cloudsql-proxy that referenced this issue Jun 15, 2017
@olivierboucher
Copy link

@Carrotman42 Can you tell me if the current interface suits you? I'm pretty sure it would be compatible with most logging libraries. Just give me a clear and I'll replace references to the stdlib logger in the entire repo

@Carrotman42
Copy link
Contributor

@olivierboucher sorry I didn't see your comment from a day ago, and I'm also not exactly sure which interface you mean.

After receiving #100 I went ahead and made the changes I suggested in #44 (comment). This will be sent out later today.

@Carrotman42
Copy link
Contributor

Setting -verbose=false will now turn off the new/closed connection logs. Note that errors which are not EOF will still be logged when in non-verbose mode since these may be useful for debugging client-/server-side problems. Those who would like to disable all output can use the -quiet flag submitted in #100

yosatak pushed a commit to yosatak/cloud-sql-proxy that referenced this issue Feb 26, 2023
Clarify App Engine usage in the README.

This messaging change was previously made in the dockerfile error message, but missed in the README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants