me.at.coding
me.at.coding

Reputation: 17724

Android: Redirecting Log.x() calls to a file?

is it possible to log messages sent through Log.x(...) [x € d, i etc.] to a file? Thanks for any hint!

Upvotes: 1

Views: 554

Answers (2)

prathi
prathi

Reputation: 1

open the cmd prompt

set up the path of our platform tools in android sdk

eg:

c:\android-sdk\platformtools > adb logcat > log.txt

This is the command to store the log in a file:

adb logcat > log.txt

Upvotes: 0

Chris Stratton
Chris Stratton

Reputation: 40397

From the adb shell you can do logcat > some_file

You can probably also issue this shell command from an application which has the necessary permission to read logs

Upvotes: 1

Related Questions