title: Add timestamps to command output redirected to text file
body: <p>I am writing adb logcat command output to the text file:</p>
  
  <pre><code>adb [-s device_id] logcat &gt; logfile.txt
  </code></pre>
  
  <p>Unfortunately, in this case the logs don’t have timestamps.
  Is there way to just insert timestamps (or whatever text) at the beginning of each line of the redirected command output?</p>
  
  <p><strong>Update</strong>: I found that simply using <code>logcat -v threadtime</code> (<a href="http://www.herongyang.com/Android/Debug-adb-logcat-Command-Log-Format-Control.html" rel="nofollow">example</a>) is enough.</p>