title: Catch LogCat programmatically or export it to file?
body: <p>I want to filter a logcat</p>
  
  <pre><code>String myCommand="logcat -f /sdcard/output.txt"; //no filters, keep writing  
  myCommand="logcat -d -f /sdcard/output.txt"; //no filters, just a dump
  </code></pre>
  
  <p>Working fine for me but not for mytag .</p>
  
  <p>I am also using the code: </p>
  
  <pre><code>String myCommand="logcat myTag *:S"; //the equivalent of logcat -s myTag  
  myCommand="logcat -s myTag:D";   
  myCommand="logcat -s myTag:E myTag2:D";  
  myCommand="logcat myTag:E myTag2:D";  
  </code></pre>
  
  <p>But it returns empty file.</p>