> There's a big difference between having verbose logging included but
> disabled, and having it excluded.  The LOG_NDEBUG and Config.LOGV (or
> local "verbose log enable") defines cause the messages to not be
> compiled in at all, which makes the code faster and smaller.
>
> This is particularly important in Java, where something like Log.v
> (TAG, "The cow says " + moo) causes a bunch of allocations and
> StringBuilder activity even if the Log.v call eventually does nothing.

Yes I totally agree. But for develop and debug purpose, it can be
worthy of having all verbose messages compiled (although it must be
decreasing the performance significantly), and selectively view
verbose log from specific modules by "adb logcat [MODULES_LIST]".

One annoying thing I found out during debugging is I have to manually
make verbose messages compiled for each single source file. As I trace
the bug, I need to re-compile all the time. Anyway, this may not be
necessarily a bad thing, as it can force me to be more cautious to
analyze and choose the right source files to be compiled with verbose
messages.

Thanks for the info about the StringBuilder activity. I haven't
thought of that.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to