views:

86

answers:

1

New to Android and just looked at http://developer.android.com/reference/android/util/Log.html

My question is regarding everything except debug. How do these Log entries get cleared such as Error so that they don't consume space? Also, Is there a way that the logfile can be queried so that it can be sent to a central web service or something for quality purposes etc.?

+1  A: 

Log space is a limited resource shared by all apps on the device. Newer entries push out older ones. You can read the logs if you have the correct permission, but this can be considered rude/borderline spyware by users since it will give you much more information than just what your app contributes to the log.

You can already get problem report data for Market apps as reported by the system: http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html

adamp
Reading the logcat is spyware?
Falmarri
Perfect Thanks!
@Falmarri: Since the log is a shared resource it can be. What business does your app have looking at what else a user has running on the system? Which activities are launched when? Any data that other apps may have written to the log? Apps are discouraged from logging personally identifying information but there are a number of apps that do so anyway and not always on purpose. If reading the system log is not a primary function of your app it probably should not be reading it.
adamp