views:

336

answers:

2

Does anyone know how to filter out the logcat ('adb shell logcat') so that it only shows the log statements after current date and time ? Thanks in advance.

+2  A: 

Activities created after the current date and time? Or just log statements after the current time? Could it be as simple as "adb logcat -c; adb logcat"

Stan Kurdziel
Yup, my mistake, I meant log statements after the current time. I'm writing a java program that execute 'adb shell logcat' which I assume is the same as 'adb logcat'. When the program is stopped and restarted, the log displayed includes those from previous run. So I'm looking for a way to filter out the log statements from after the current time.
phillyville
Never mind, "adb logcat -c; adb logcat" does it :) Thanks Stan!
phillyville
A: 

Before you start up logcat first pass it the argument -c In the terminal you would say

adb logcat -c
adb logcat

This would produce a fresh log.

schwiz