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-1230605: Easy logging garbage in std out make it unusable #794

Closed
velocityzen opened this issue Mar 12, 2024 · 10 comments
Closed

SNOW-1230605: Easy logging garbage in std out make it unusable #794

velocityzen opened this issue Mar 12, 2024 · 10 comments
Assignees
Labels
question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team

Comments

@velocityzen
Copy link

  1. What version of NodeJS driver are you using?
    1.10.0

  2. What operating system and processor architecture are you using?
    macOS, linux

  3. What version of NodeJS are you using?
    (node --version and npm --version)
    20.11.1

  4. What are the component versions in the environment (npm list)?
    what component?

5.Server version:* E.g. 1.90.1
You may get the server version by running a query:

SELECT CURRENT_VERSION();
  1. What did you do?

Every time I start my application I have this output:

(node:46590) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
{"level":"INFO","message":"[9:48:23.841 AM]: Trying to initialize Easy Logging"}
{"level":"INFO","message":"[9:48:23.846 AM]: No client config file found in default directories"}
{"level":"INFO","message":"[9:48:23.846 AM]: Easy Logging is disabled as no config has been found"}

it makes stdOut completely unusable.

  1. What did you expect to see?

nothing

@velocityzen velocityzen added the bug Something isn't working label Mar 12, 2024
@github-actions github-actions bot changed the title Easy logging garbage in std out make it unusable SNOW-1230605: Easy logging garbage in std out make it unusable Mar 12, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage Issue is under initial triage and removed bug Something isn't working labels Mar 12, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Mar 12, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

sfc-gh-dszmolka commented Mar 12, 2024

hi, would setting snowflake.configure({ logLevel: "WARN" }); help you perhaps ?
to completely eliminating logs from the driver, you can set it to OFF too.

edit: the new INFO level messages you're seeing are associated with the new Easy Logging feature where we wanted to give some feedback to the users about initialization, etc. If you don't need those messages, perhaps setting th log level a bit lower could help reduce the number of messages, while still keeping those which are more important like warnings, errors, etc.

@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels Mar 12, 2024
@velocityzen
Copy link
Author

The "OFF" setting would be very nice, but typescript type don't have that right now. I'll force use "OFF" for now. Thank you!

@sfc-gh-dszmolka
Copy link
Collaborator

glad to hear it could help you ! on a separate note we're also working on having the types for the snowflake-sdk as part of the library (#309) so hopefully it'll be easier in the future.

marking this one as closed for now as issue has been resolved, but if you need further help, please do comment and i can reopen

@sfc-gh-dszmolka sfc-gh-dszmolka added the question Issue is a usage/other question rather than a bug label Mar 12, 2024
@cleve-fauna
Copy link

cleve-fauna commented Aug 5, 2024

Its pretty annoying. Could we get that default information about easy logging out of there?

@sfc-gh-dszmolka
Copy link
Collaborator

thanks folks for all this feedback. will try to address it in #886

@sfc-gh-dszmolka
Copy link
Collaborator

sfc-gh-dszmolka commented Aug 14, 2024

TIL from #886 (comment) that logging EasyLogging messages on INFO level is a request from Snowflake Security team for compliance, and it's not allowed to change it to DEBUG. So it stays on INFO apparently, apologies everyone.

If it's disturbing, please set a higher general loglevel or turn it OFF , see #794 (comment)

@markddrake
Copy link

OFF fixed it thanks

FWIW my product supports copying data to and from Oracle, Microsoft, MySQL, Postgres, MariaDB, MongoDB, Yugabyte, Cockroach DB, Amazon AWS S3 BLOB, Microsoft Azure-BLOB, IBM-DB2, Vertica and none of their SDKs dump spurious log messages by default.

@bcardiff
Copy link

I'm facing this issue, but even if I do

snowflake.configure({
  logLevel: "OFF",
  additionalLogToConsole: false
})

I still see one log entry in the stdout.

{"level":"INFO","message":"[5:29:46.973 PM]: Configuring logger with level: -1, filePath: undefined, additionalLogToConsole: false"}

Is there a way to turn off all the logging? The process I'm working on needs to be in total control of what it is sent to stdout.

@sfc-gh-dszmolka
Copy link
Collaborator

@bcardiff you're experiencing #957

@bcardiff
Copy link

Yes! 🎯 Thank you @sfc-gh-dszmolka . The workaround shown there is enough for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

5 participants