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

Possibility to disable "[APPSIGNAL]: Started in development mode." #297

Open
Calamari opened this issue May 12, 2020 · 9 comments
Open

Possibility to disable "[APPSIGNAL]: Started in development mode." #297

Calamari opened this issue May 12, 2020 · 9 comments
Labels
enhancement requests small issue Small issues anyone can close in about an hour.

Comments

@Calamari
Copy link

Is your feature request related to a problem? Please describe.
Since #274 the message "[APPSIGNAL]: Started in development mode." is logged to console.warn every time the Appsignal class is constructed which bloats the test output in JavaScript tests and in feature Specs, where we throw errors if console logs warnings and errors.

Describe the solution you'd like
It would be great to suppress this warning directly when instantiating the class and without providing a key – since we do not want to log errors in tests.

I am not quite sure, why this has to be logged at all – that is not clear from reading #274. I would also argue that it might be more an info than a warn. But I would propose to either enable this behavior (if really needed) through a config parameter in the constructor, or at least adding a config parameter to suppress this warning (maybe something like environment: "test" to disable it).

And before I forget it: Thanks for this lib, you are doing a grant job.

@adamyeats
Copy link
Contributor

adamyeats commented May 14, 2020

@Calamari Apologies it's taken so long to get back to you, normally I'd like to get around to commenting on issues much quicker than this, but we've been full throttle releasing Node.js stuff this week. Thanks for the kind words about the library!

I agree that this should be an info not a warn, so first, I'll get a patch out for this ASAP. To your broader point that log output should perhaps be suppressed when NODE_ENV=test (or something similar) - I think that's a good idea also. I'll schedule some time to look at this next week.

@Calamari
Copy link
Author

No worries about the timing. :-)
We have a workaround in place right now, but of course I like to get rid of that again.
Thanks for taking care.

@adamyeats adamyeats removed their assignment Apr 19, 2021
@marten
Copy link

marten commented Jan 25, 2022

@Calamari I'd be interested to hear about your workaround. This message annoys me a lot as well.

@marten
Copy link

marten commented Jun 22, 2022

Still here. The console logs print on test runs, so this is really annoying.

@Calamari
Copy link
Author

Honestly, I don’t know anymore how I worked around this, since I don’t work on that project anymore 🤷

@tombruijn
Copy link
Member

Let's just remove it team. It's confusing.

Also related: https://app.intercom.com/a/apps/yzor8gyw/inbox/inbox/conversation/16410700131499

@tombruijn tombruijn added the small issue Small issues anyone can close in about an hour. label Jul 18, 2022
@tdd
Copy link

tdd commented Nov 8, 2022

Hey all, any progress on this? Major annoyance in my test suites.

@backlog-helper
Copy link

backlog-helper bot commented Feb 1, 2023

Closing this issue because it is archived on its parent project.

@backlog-helper backlog-helper bot closed this as completed Feb 1, 2023
@tombruijn tombruijn reopened this Feb 1, 2023
@unflxw
Copy link
Contributor

unflxw commented Dec 11, 2023

Could be fixed by implementing #527 -- by centralising logging, it would be possible for customers to set a lower log level and ignore this warning.

@unflxw unflxw mentioned this issue Dec 11, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement requests small issue Small issues anyone can close in about an hour.
Projects
None yet
Development

No branches or pull requests

6 participants