-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add a way to suppress WARN for stackdriver NODE_ENV setup #460
Comments
Actually I'd like to amend the request. Upon setting the
My expectation was that when I disable reporting, the library does not attempt to lookup any credentials or perform any other actions. Basically becomes a no-op. |
@defunctzombie this seems like a reasonable expectation 👌 |
@defunctzombie production (default) always never So in case of In case of The above functionality is working as expected @bcoe I think this is fair behavior WDYT? |
@laljikanjareeya sorry for jumping in, but why throw a warning if I specifically have changed the NODE_ENV variable? For example when running unit tests this adds too much noise to the output. It would be nice to be able to "silence" those warnings. |
@bachlis It throws a warning when both |
Yes, it would be a nice warning to silence. It's very common setup to have these logs only produced in production. |
Its very annoying to still have this unnecessary message filling up my log files. Please remove! |
When I run my unit tests, the stdout contains lots of the following warning:
WARN:@google-cloud/error-reporting: The stackdriver error reporting client is configured to report errors if and only if the NODE_ENV environment variable is set to "production". Errors will not be reported. To have errors always reported, regardless of the value of NODE_ENV, set the reportMode configuration option to "always".
This happens because my unit tests invoke my entire app (a koa2 app) which includes the error reporting setup.
I'd like a way to suppress this warning for testing - maybe by handling
NODE_ENV=test
or a configuration option.The text was updated successfully, but these errors were encountered: