Time displayed in Logcat

user1741274 picture user1741274 · Feb 27, 2013 · Viewed 58.4k times · Source

I need to get the Android device timestamp in the format hh:mm:ss:SS. I am able to view the time displayed in the Logcat of Eclipse. Is it the computer's time or is it the Android device's time?

Answer

brianestey picture brianestey · Feb 27, 2013

From the docs of logcat you can see that there is an option to specify how the output is formatted (-v).

To get a timestamp, you can use the command

logcat -v time

This will prefix each message with a timestamp.