Hi all
I'm trying to fetch logs from system,and this is my solution:
Process p=Runtime.getRuntime().exec("logcat -d -v time -b main *:D")
InputStream is=p.getInputStream();
then write the inputstream to a file,
some guys may say it's more conveniently to use "logcat -f filename".
but the filter-spec of logcat doesn't support a regex.
and i want to use a regex to filter the logs.
the problem is:after every execution of fetch logs.
i will execute a command "logcat -c" to clear the buffer in cache.
but it seems doesn't work well.
any suggestion or solution?
Thx.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en