Closed Bug 725082 Opened 12 years ago Closed 12 years ago

Add logging level support to Android Sync

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dchanm+bugzilla, Unassigned)

References

Details

There are privacy concerns with the current logging that Android Sync performs. While it is beneficial to have this data for debugging purposes, we should look into a way to reduce the amount of data collected.
can we also add a config to toggle sync logging?   i certainly think it could even help improve performance.   

This could be another bug.
We may be able to do this with Log.isLoggable() and the log.tag.* property. [1] The code would have to be refactored to call a function which checks Log.isLoggable(). We could also expose a user preference to control the logging level by calling System.setProperty().


[1] - http://developer.android.com/reference/android/util/Log.html#isLoggable%28java.lang.String,%20int%29
[2] - http://developer.android.com/reference/java/lang/System.html#setProperty%28java.lang.String,%20java.lang.String%29
(In reply to Tony Chung [:tchung] from comment #1)
> can we also add a config to toggle sync logging?   i certainly think it
> could even help improve performance.   
> 
> This could be another bug.

We could wrap the enable/disable check into the above function? This does incur the overhead of a function call though.
(In reply to David Chan [:dchan] from comment #2)
> We may be able to do this with Log.isLoggable() and the log.tag.* property.
> [1] The code would have to be refactored to call a function which checks
> Log.isLoggable(). We could also expose a user preference to control the
> logging level by calling System.setProperty().

Ugh, Android is awful. At this point we might as well roll our own, particularly given that we'll be wanting Syncorro integration.
(In reply to Richard Newman [:rnewman] from comment #4)
> (In reply to David Chan [:dchan] from comment #2)
> > We may be able to do this with Log.isLoggable() and the log.tag.* property.
> > [1] The code would have to be refactored to call a function which checks
> > Log.isLoggable(). We could also expose a user preference to control the
> > logging level by calling System.setProperty().
> 
> Ugh, Android is awful. At this point we might as well roll our own,
> particularly given that we'll be wanting Syncorro integration.

Because Android

I'll test what happens if Log is called when the message level is set to not be logged. But it does seem like we will need our own class to handle Syncorro. integration and better logging.
Priority: -- → P3
We handled much of this in a separate bug. Closing.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Mozilla Services → Android Background Services
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.