Saturday, June 4, 2011

Re: [android-developers] Control level of Log class

But thats my point... Whatever I decide to put into it is irrelevant... or more likely related only the application I'm developing.
All I want to do is have tell the system <tag_name> = <level> wich Log can do just fine... however it can't do it from the app your debugging... you have to set up the /data/local.prop or a whole bunch of system properties.

The features already exist for the things you guys have both reinvented, and I'm not even saying you didn't need to... i'm saying that the facilities already exist but are only useful if you have root access to the phone your testing on... which seems to be a significant oversight to me.

@Kostya those who can write perfect code in a complex app the first time would be superheros if they weren't already fairytales :) We all use some form of logging.

@Marcin Yah, it is pretty generic, but so is any logger. Your wrapper is perfectly fine... I'm talking about the ability to control what gets logged or turn it off altogether and a consistent controlled way. It exists in Log, but its not generally accessible... its entirely dependent on what the manufacturer forgot to turn off in the OS build. You could have gotten the same sort  of output using the included javax.util.logging package.

Since I seem to have not been clear... the problem is that there doesn't seem to be any way to control the *log level* for the Log class from the application your working on. You can only do it from the underlaying OS.

Any of us who have worked with more than one physical phone at a tie knows that some phones are much noisier than others in their output (output that is not relevant to the application under development). Can nobody see the advantage is turring down log level within an app for all the extra crap you don't need, or adjust the level for the tags within you own app to you can focus on a particular part of your code?

This makes me think that Log was never ment to be used by us developers in general... it may have originally been intended that we use the javax.util.logging package instead... but thats not how things turned out and maybe there needs to be an update to the class so that it can be controlled by the developer for the tags they care about.

- Brill Pappin

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment