sindresorhus / strip-debug

Strip console, alert, and debugger statements from JavaScript code
MIT License
84 stars 15 forks source link

request: log-level option #7

Closed builtbylane closed 9 years ago

builtbylane commented 9 years ago

to allow for console.warn and console.error to remain for instance

artemyarulin commented 9 years ago

Hi there, +1 for this! Would be really cool to have this options. I can take care about gulp plugin after it will be implemented

sindresorhus commented 9 years ago

Why do you need this? This is meant for stripping debug logging for production. I can see no reason to keep any of that in production.

artemyarulin commented 9 years ago

Originally my idea was to use this tool during development as well: For example I would like to make my application max verbose during test runs (no strip-debug is used), but during everyday development I have no need to see console.info as it to detailed for me, and for production - absolutely no logs is used.

But now when I wrote it I realized that I just need to use logging framework :) Sorry I took your time, thanks for the project BTW!

sindresorhus commented 9 years ago

Yup. A logging framework is the way to go for that :)

jlocans commented 7 years ago

Hey. I am developing sort of javascript api that other client applications can use. Some functions become depricated and it would be nice to keep console.warn() statements there. Maybe you can reconsider adding this option...