I have a heck of a lot of Log.i Log.d Log.e in my code for a recent application that I made. I am going to publish this application, and I really do not want people to see it when they connected the phone to adb, but I want it there for my own debugging.
I would like to expand the android.util.log file and just have a logical switch so that I can just turn off the log when I publish it and turn it on during development, but this class is final, I donβt miss the trick?
I really do not want to go through my code, delete everything, however, if the worst comes to the worst, I could do ctrl + h global to replace Log for // Log, but it sucks as an answer.
I also understand that Log.d is being deleted at runtime, but it still works (losing a little performance), so not launching it will be an additional bonus.
Yes, so basically I'm looking for a way to turn debugging on and off programmatically, it can also allow me to make this preference later or something if people want to look at it or help and send it.
What are you guys implementing for this?
thank
android debugging design-patterns logging logcat
Blundell Nov 16 '10 at 10:12 2010-11-16 22:12
source share