This is a very simple problem and I've searched to find that no one
else seems to be having it, anyway...

My code is something like:

if (Log.isLoggable("mytag", Log.DEBUG)) {
    Log.d("mytag", "Logged at debug level");
}

The documentation says that by default logging is enabled at INFO
level. This appears to be correct, since the above IF condition
evaluates to false. Also, replacing Log.DEBUG with Log.INFO, means it
evaluates to true as expected.

However, if we remove the if statement then shouldnt the Log.d()
statement do nothing?

Next, when I follow either of the two documented methods for changing
the default logging level neither of them work:

1. I open up a terminal (through Dev Tools) and type "setprops
log.tag.mytag DEBUG". Then I debug my app (through eclipse) and the
isLoggable call above is still evaluating to false

Side question: What is the lifespan of that setprops call?

2. I placed a new file called "local.prop" in the /data folder. The
file contains one line: "log.tag.mytag=DEBUG".

Side question: The documentation says to place the "local.prop" file
in "/data/local.prop" which is not clear. I assume it does NOT mean
create a folder called "local.prop" and place a "local.prop" file in
that folder.

So neither of those work for me. What am I doing wrong? Is eclipse
somehow overriding my settings?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to