Author Topic: Logger-file location (Newbe question)  (Read 1675 times)

Offline gucky

  • byte
  • *
  • Posts: 6
    • View Profile
Logger-file location (Newbe question)
« on: January 25, 2011, 11:44:00 am »
Hello everyone,

since I'm starting to get a bit used to Android I wanted to write a little 3D application. For debugging reasons I need to get some messages which I tried to log.  (like this one: Logger.log("Translation: "+f.getTranslation());)

My problem is, I don't know where the logfile is saved. I looked everywhere in my project (since it is not big I finished quickly) and after that looked in the documentation for a possibility to set my own path. Can you tell me where that log-file is located?

Thanks,
gucky

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Logger-file location (Newbe question)
« Reply #1 on: January 25, 2011, 12:28:59 pm »
DDMS in eclipse is better and you can watch what does your app in realtime

Offline gucky

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Logger-file location (Newbe question)
« Reply #2 on: January 25, 2011, 01:17:48 pm »
Thanks for the answer but DDMS isn't working right. (It starts with an exception and won't show any data while the emulator is running) I believe you, that DDMS is more useful and I will try to get it running, but right now I could fix my problem just with the logfile.

Doesn't anybody know where it is?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Logger-file location (Newbe question)
« Reply #3 on: January 25, 2011, 01:20:28 pm »
You might as well try to run ddms outside of Eclipse. There's a ddms.bat in the SDK's tools directory to start it.

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Logger-file location (Newbe question)
« Reply #4 on: January 25, 2011, 06:45:49 pm »
this prints out the log to the console

Code: [Select]
<android home>/platform-tools/adb logcat

Offline gucky

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Logger-file location (Newbe question)
« Reply #5 on: January 26, 2011, 10:12:37 pm »
Thanks to all of you. I where now able to do both.

Offline icarusfactor

  • int
  • **
  • Posts: 58
    • View Profile
Re: Logger-file location (Newbe question)
« Reply #6 on: January 28, 2011, 12:21:27 am »
  Also, if you need to copy the debug file to a local filesystem
 I use this command below so I can open it into an editor
 and do searches etc..

Save log to file:
adb logcat > logfile.txt

Then open it in an editor:
gvim logfile.txt