question: public static void log ( String TAG , String msg , int type , Exception e ) { if ( msg != null && ! msg . equals ( "" ) ) { if ( debugMode ) { if ( TAG == null ) { TAG = Constants . TAG ; } switch ( type ) { case 1 : Log . v ( TAG , msg ) ; break ; case 2 : Log . e ( TAG , msg , e ) ; break ; case 3 : Log . d ( TAG , msg ) ; break ; } } } }
target:  This method allows you to output debug messages only when debugging is on. This will allow you to add a debug option to your app, which by default can be left off for performance. However, when you need debugging information, a simple switch can enable it and provide you with detailed logging. <p/> This method handles whether or not to log the information you pass it depending whether or not RootTools.debugMode is on. So you can use this and not have to worry about handling it yourself.