Flexible enable/disable logging in Android app
<p>For performance wise, some people suggest use the following method, e.g.</p>

<pre><code>public class MyActivity extends Activity {  

 private static final String TAG = "MyApp";  
 private static final boolean D = true;

 @Override  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if(D) Log.e(TAG, "MyActivity.onCreate debug message");  }
</code></pre>

<p>But this is non-senese when are working on a large project, because when you debug, you need to update many files for the <code>debug</code> flag, are there any better method?</p>
