The Log class should be used for debugging purposes only, and all regerences to the Log class should be removed at release time. If you dont wish to take advantage of tge Log class during debugging, then that's your choice.
1) It is perfectly fine not to use logs. Developers use logs to verify expectations (or absence) (as mentioned by @jonbonazza for development and debug purpose), another way to do that is with assert. Tell you the truth, I consider logging expensive, though I know there is other camp that does not, which I totally respect. There is a price to pay when you log and debug (see #3 as counter argument).
2) In a complex code where different components interact with each other i.e. message passing with intents, broadcast, message handlers etc. Another typical situation is timer, async callback code is crooked to debug i.e. you could be waiting for every if your timer/callback logic incorrect, logs certainly help there.
3) A third point is that Log's should not be part of production code. You can setup a global constant LOGIT = true and check that before calling Log.x. Set it to false to skip logging in production app. Though I've not tried, but there seem to be ways to skip inclusion of log class (if you write a wrapper around android Log) and remove corresponding statements from the code automatically using frameworks such as maven, ant or proguard etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.