How to detect first instance in Android logs?

Discussion in 'Android App Developers' started by Natey2, Mar 22, 2012.

  1. Natey2

    Natey2 Active Member

    Joined:
    Oct 23, 2010
    Messages:
    1,310
    Likes Received:
    5
    Trophy Points:
    38
    Ratings:
    +5
    I would like to detect the first occurrence of the substring "Low Memory" in my Android (logcat) logs.
    How would I do that on my Android device?

    In a normal Linux system, I could do something like:
    $ tail -f logfilename | grep 'Low Memory' > occurrences.txt

    Sent from my unrooted DroidX using Tapatalk