Open twaddington opened 11 years ago
@twaddington, I agree it would be nice to prevent Hoot from logging all this info in release builds without having to make an alteration to Hoot for each project. Unfortunately, it looks like in some cases the BuildConfig.DEBUG will be true even for exported application packages, so I don't want to rely on it here. I have an alternative solution that I will push momentarily.
So I think it's probably important to wrap any verbose/debug level log calls with controls so they can be disabled. I'm not sure we want our API endpoints printed to the log everytime someone uses the app.
I was thinking you could do something simple like:
We could also do something more complicated like using the
Log.isLoggable()
method like so:However, this is slightly more confusing and suppresses log levels below
INFO
by default. UsingisLoggable
you can set your minimum log level by running the following command from the command-line:Personally I like the first option. Short and sweet. Thoughts?