1. Download our Official Android App: Forums for Android!

Apps how to enable logs

Discussion in 'Android Development' started by Karan_Aricent, Jul 22, 2010.

  1. Karan_Aricent

    Karan_Aricent Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    9
    Joined:
    Jun 25, 2010

    Jun 25, 2010
    9
    0
    25
    Software Engineer
    Gurgaon
    Hi,

    I want to know that how to enable all logs in android. iwant to see logs using a G1 device.

    Regards,
    Karan.
     

    Advertisement

  2. ophanin

    ophanin Newbie
    Rank:
    None
    Points:
    35
    Posts:
    20
    Joined:
    Jun 14, 2010

    Jun 14, 2010
    20
    0
    35
    Graduate Student
    Rochester, NY
    Like in your own code?

    To do that, in your program, you import android.util.Log and then call 'Log.x', where x can be i (info), e (error), d (debug), etc. Generally, the arguments are then a debug tag (to be able to identify it amongst the other logs) and the actual log message.

    My example:
    final string DEBUG_TAG = "MyAwesomeApp"
    Log.i(DEBUG_TAG, "This is my message");
     
  3. ophanin

    ophanin Newbie
    Rank:
    None
    Points:
    35
    Posts:
    20
    Joined:
    Jun 14, 2010

    Jun 14, 2010
    20
    0
    35
    Graduate Student
    Rochester, NY
    Oh, and then to seem them, use the DDMS tool. I've only used it through the DDMS view in Eclipse, but I am sure that there is a standalone log reader among the Android SDK tooks.
     
  4. James McMurray

    Rank:
    None
    Points:
    15
    Posts:
    18
    Joined:
    May 5, 2009

    May 5, 2009
    18
    0
    15
    If you just want to see what logs your phone is spitting out as you use it, there are android apps for that. Search the market for aLog.
     

Share This Page

Loading...