How to copy logcat output to clipboard?

后端 未结 9 2257
忘了有多久
忘了有多久 2020-12-01 13:42

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

相关标签:
9条回答
  • 2020-12-01 14:21

    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.

    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.

    0 讨论(0)
  • 2020-12-01 14:22

    Select the message and press ctrl+c. You can save it in a text file using this button:better picture

    If you are using mac a workaround is to right click, find similar messages, then copy from dialog. – Thank you Snicolas

    0 讨论(0)
  • 2020-12-01 14:24

    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

    Step 2:

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

    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.

    0 讨论(0)
提交回复
热议问题