Question

I'm using the eclipse plugin for android development. When I copy/paste log contents from ddms, I always get the timestamp etc in the copy/paste:

05-16 21:43:09.082: INFO/ActivityManager(110): [message text]
05-16 21:43:09.152: INFO/ActivityManager(110): [message text]
...

Is there any way to clip the timestamp + debug level + pid from the paste as seen above, and only get the [message text] copied? It just gets annoying sometimes when sending log details to others as it's a bit noisy for them to look at,

Thanks

Was it helpful?

Solution

Filter your logs with this one-liner:

perl -pe 's/^(.*?: ){2}//'

OTHER TIPS

Write a 5 line program to remove the first 20 characters of each line to remove the timestamp, or use line.split(" ") to remove the first 3 parts.

Or use a text editor with block selection such as TextPad

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top