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-1800528 don't log anything if logLevel is set to OFF #958

Merged

Conversation

sfc-gh-dszmolka
Copy link
Collaborator

Description

In #957 is was reported that even with
snowflake.configure({ logLevel: OFF });

which is expected to disable logging; a single logline is still logged

{"level":"INFO","message":"[2:27:54.321 PM]: Configuring logger with level: -1, filePath: undefined, additionalLogToConsole: undefined"}

at default INFO level before setting loglevel to -1 and actually disabling logging.

Moving this logline to after the logger has been configured with local loglevel allows for preserve the same information for the ones who need it for tracking purposes, and stop logging it for the ones who wish the driver to not emit logs.

Checklist

  • Format code according to the existing code style (run npm run lint:check -- CHANGED_FILES and fix problems in changed code)
  • Create tests which fail without the change (if possible)
  • Make all tests (unit and integration) pass (npm run test:unit and npm run test:integration)
  • Extend the README / documentation and ensure is properly displayed (if necessary)
  • Provide JIRA issue id (if possible) or GitHub issue id in commit message

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.90%. Comparing base (f7d8b00) to head (22f49e6).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #958      +/-   ##
==========================================
+ Coverage   88.87%   88.90%   +0.02%     
==========================================
  Files          69       69              
  Lines        6685     6685              
==========================================
+ Hits         5941     5943       +2     
+ Misses        744      742       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sfc-gh-dszmolka sfc-gh-dszmolka merged commit c4e6edb into master Nov 13, 2024
58 of 59 checks passed
@sfc-gh-dszmolka sfc-gh-dszmolka deleted the SNOW-1800528-dont-log-anything-if-loglevel-off branch November 13, 2024 10:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants