Skip to content

[logcat]view log from stdout & writing log file simultaneously

02/22/2010
tags:

If you have an adb connection with the device,
#adb shell logcat 2>&1 | tee /tmp/`date +%y%m%d-%H%M%S`

If you have a shell on the device,
#logcat 2>&1 | tee /tmp/`date +%y%m%d-%H%M%S`

When you’re done, press CTRL+c.
Then, you’ll see a log from stdout, and log file in /tmp as following.
100222-101603
100222-101626

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: