Saturday, June 4, 2011

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

Brill,

A few more thoughts on this, if I may.

The logcat stuff is the *system* log, and I treat it as such. It is handy for quick and dirty tests, but it wasn't built specifically for my work :), so I don't expect it to do everything I need. That's my take on it, and so it made sense to build my own thing.

Point two. The logcat is not very useful for remote use, and that's a very important part of getting from a prototype to a quality product.

Point three. Speaking of remote use, I much prefer being able to tell my users "open the app's settings, press 'enable logging'" than, hypothetically, "open system settings, enable tags abc, xyz, and foo, then come back to my app".

Point four. I wouldn't use the Windows event log for application diagnostics, and that's a system log as well, pretty close to the logcat as far as its place within the system.

Point five. Dianne has previously indicated that there may be logcat restrictions in the future because some applications leak personal information there.

As for some devices being too chatty, weeell... I feel this pain as well, but that's outside of my control, so I just pipe the logcat through filters, that's all.

PS - I think this email is longer than my logger class...

--
Kostya Vasilyev

05.06.2011 1:23 пользователь "Brill Pappin" <bpappin@sixgreen.com> написал:
> 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

--
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