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

Feature request: Ability to switch on and off particular log type -> console.(INFO,WARN,ERROR,TRACE etc) #202

Open
crealityeducation opened this issue Dec 6, 2021 · 1 comment

Comments

@crealityeducation
Copy link

If my project has console.(INFO,WARN,ERROR,TRACE etc) log type and accordingly placed in the js library. for DEV purpose I would like to have INFO enabled but in prod I dont want INFO logs. There is a way to handle it with GV INFO = true/false and the INFO && console.info(xxx). But I don't like this way of writing code. Is there any way to set console.info=true/false which will make the specific type of logs visible?

Thanks,
Atul Ingale

@crealityeducation crealityeducation changed the title able to switch on and off particular log type Ability to switch on and off particular log type -> console.(INFO,WARN,ERROR,TRACE etc) Dec 6, 2021
@crealityeducation crealityeducation changed the title Ability to switch on and off particular log type -> console.(INFO,WARN,ERROR,TRACE etc) Feature request: Ability to switch on and off particular log type -> console.(INFO,WARN,ERROR,TRACE etc) Dec 6, 2021
@domfarolino
Copy link
Member

I think the usual methods of turning off console logs in production are typically done at a level above this specification, and that seems pretty reasonable to me. There have been somewhat-related proposals like #175, but there didn't seem to be too much appetite for this.

Given that, I'm tempted to close this unless implementers want to weigh in /cc @nchevobbe @JosephPecoraro.

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

No branches or pull requests

2 participants