Thanks. I'll try that.

Also I looked at the source for isLoggable and it looks like it is
pretty expensive (doing file IO on every call I think) so you probably
would not want to use this technique a lot in an app.

On Oct 29, 7:14 pm, fanfan <[email protected]> wrote:
> I try this and find it works. Just use the setprop
> log.tag.<YOUR_LOG_TAG> <LEVEL>.
> Be care that the log.tag is necessary
>
> On Oct 13, 7:14 am, jotobjects <[email protected]> wrote:
>
> > Just playing around with Log.isLoggable(tag, level) method.
>
> >             Log.d(LOGTAG, "--- debug log");
> >             Log.i(LOGTAG, "--- info log");
> >             if (Log.isLoggable(LOGTAG, Log.INFO)) Log.i(LOGTAG, "---
> > isLoggable info log");
> >             if (Log.isLoggable(LOGTAG, Log.DEBUG)) Log.d(LOGTAG, "---
> > isLoggable debug log");
>
> > These all send output to the log except the last.
>
> > Following the instructions in the API for Log.isLoggable I used adb to
> > set the value of LOGTAG to DEBUG as follows -
>
> > # setprop com.foo.bar DEBUG
>
> > where "com.foo.bar" is the value of LOGTAG. But the 4th Log still does
> > not print.  I tried stopping and restarting the emulator and removing
> > and reinstalling the app and setting the property before the app
> > started. No luck so far.
>
> > I was assuming the mechanism would allow me to turn up the logging
> > verbosity on a running app, but so far I don't get isLoggable to do
> > anything at all.  Any suggestions?
>
> > Related questions:
> > - What API call will get the values that you see with "adb shell
> > getprop"?
> > - isLoggable suggests creating a /data/local.prop file.  Is the idea
> > to copy that file onto the device or is there another way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to