How to copy logcat output to clipboard?

Viewed 16767

I'm developing android apps in eclipse and how can I get logcat messages to my clipboard?

9 Answers

Copy only what is required in Android Studio

Out of the curiosity I thought to post this answer. By default Logcat shows other information also along with the logs like Date Time, Process and Threads, Package name and Tag and if you copy a line from Logcat then this whole information is copied as well.

In case you don't want this at all or you don't want a particular thing then you can do something like this,

Step 1:

Click on Logcat Header(Settings/Gear) icon

enter image description here

Step 2:

Untick whatever you don't want to see in the logs and ultimately you don't want to copy.

enter image description here

That's it.

I thought it might help someone.

P.S. The question is very old and asked at the time of Eclipse, but this answer is new and is for Android Studio.

From a command line:

adb logcat > log.txt

Here is a technique for copying multiple data columns from Logcat, to paste in a spreadsheet.

Format your Log data with consistent padding (spaces, zeroes). Separate the data with tabs (tabs work with Google Sheets). Use a tag to filter the Logcat output.

Log.d("MY_TAG", String.format(Locale.ENGLISH, "value1, value2 %08d\t%03d", data1, data2));

After the app has produced some output, in the Logcat window hold down the ALT key, and drag down to select the columns.

select multiple Logcat columns

Use CTRL+C (Windows) to copy to clipboard.

Navigate to a spreadsheet (Google Sheets), select a starting cell, and use CTRL+V to paste the columns into the spreadsheet.

enter image description here

put cursor in the logcat window. ctrl-a select all ctrl-c copy what's selected (which will be all) run vi then paste.

Related