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

Add compiler flag to elide all trace-level (or higher) logging #1

Open
sarahgerweck opened this issue Aug 8, 2014 · 2 comments
Open

Comments

@sarahgerweck
Copy link
Contributor

The suggestion came up today to add a compiler flag that would tell the compiler to just skip any statements of a certain level or lower. Something like isTraceEnabled is pretty cheap anyway, but compiling it out is even cheaper!

@lefou
Copy link

lefou commented Feb 1, 2018

One legit reason why one would need such a feature is to hide some internal details from non-debug production code, which is not unusual in closed source projects.
On the other hand, maybe tools like ProGuard already support such shrinking and do other optimizations and obfuscations as well. So, I think, this feature is not really needed.

@sarahgerweck
Copy link
Contributor Author

Good point @lefou. I've treated this as a very low priority; do you have a use case for this?

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

No branches or pull requests

2 participants