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;
}
}
}
}

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 ; } } } }
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 .
