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

SNOW-1896089: [Logs] - Downgrade log level from info to debug #2148

Open
afranzi opened this issue Jan 24, 2025 · 1 comment
Open

SNOW-1896089: [Logs] - Downgrade log level from info to debug #2148

afranzi opened this issue Jan 24, 2025 · 1 comment
Assignees

Comments

@afranzi
Copy link

afranzi commented Jan 24, 2025

What is the current behavior?

Noisy Info logs

[INFO 2025-01-24 12:06:22,169 connection.py:803] closed
[INFO 2025-01-24 12:06:22,186 connection.py:809] No async queries seem to be running, deleting session
[INFO 2025-01-24 12:06:22,260 connection.py:803] closed
[INFO 2025-01-24 12:06:22,278 connection.py:809] No async queries seem to be running, deleting session
[INFO 2025-01-24 12:06:22,308 connection.py:803] closed
[INFO 2025-01-24 12:06:22,326 connection.py:809] No async queries seem to be running, deleting session
[INFO 2025-01-24 12:06:22,351 connection.py:803] closed
[INFO 2025-01-24 12:06:22,363 connection.py:809] No async queries seem to be running, deleting session
[INFO 2025-01-24 12:06:22,385 connection.py:803] closed

What is the desired behavior?

It would be great if we could change these logs from info level to debug level to reduce noisy logs since the information currently displayed would be more debug oriented.

We could also downgrade the starting connection logs to:

[INFO 2025-01-24 12:05:16,069 connection.py:424] Snowflake Connector for Python Version: 3.13.0, Python Version: 3.10.12, Platform: Linux-6.1.94-99.176.amzn2023.x86_64-x86_64-with-glibc2.28
[INFO 2025-01-24 12:05:16,069 connection.py:1213] Connecting to GLOBAL Snowflake domain
[INFO 2025-01-24 12:05:16,069 connection.py:1295] This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.

Thank you!

How would this improve snowflake-connector-python?

It will make the library more clean.

References and other background

No response

@github-actions github-actions bot changed the title [Logs] - Downgrade log level from info to debug SNOW-1896089: [Logs] - Downgrade log level from info to debug Jan 24, 2025
@sfc-gh-mkeller
Copy link
Collaborator

sfc-gh-mkeller commented Jan 24, 2025

I think this makes sense!

@afranzi did you want to submit a PR for this?

Please leave the following logs out of all the ones you posted as info:

[INFO 2025-01-24 12:05:16,069 connection.py:424] Snowflake Connector for Python Version: 3.13.0, Python Version: 3.10.12, Platform: Linux-6.1.94-99.176.amzn2023.x86_64-x86_64-with-glibc2.28
[INFO 2025-01-24 12:05:16,069 connection.py:1295] This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.

The first one is incredibly useful when users send us info level logs. I think that's worth keeping given all the issues I have worked on and the second one I think is super important for users to see and acknowledge.

It these are annoying you though can I suggest filtering your logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants