about:sync-log
June 16, 2011
The past
For a long time Firefox Sync has had the ability to write a continuous log of what it’s doing to disk which is pretty easily accessible via about:sync-log. In the Firefox 4 beta cycle, we disabled the log by default because the disk activity of writing the log can hurt your browser’s performance, particularly on mobile (it also didn’t help that the writes to the log blocked the UI thread.)
Only problem is, having the log disabled by default means that whenever Sync fails somehow, the user won’t have a log of what happened. Right now they have to turn on logging in about:config, restart the browser, and then sync again. That means we really only have a chance of catching reproducible problems, not the intermittent ones.
The future
Last week I spent a few days fixing the logging situation and with today’s nightly (and eventually Firefox 7) things have changed. Sync now keeps the log in memory and usually discards it after a successful sync. If an error occurs, however, the log will be written to a file (but not on the UI thread!) Consequently, about:sync-log has been changed to show you the directory where the individual log files are dumped. The most recent log files will be at the bottom of that listing. (Eventually we might make this a bit prettier, e.g. by taking some inspiration from about:crashes.)
Like before, it’s still possible to tweak logging behaviour in about:config, except now you get two preferences to define what should happen on a failed and successful sync, respectively:
services.sync.log.appender.file.logOnError(default:true)- s
ervices.sync.log.appender.file.logOnSuccess(default:false)
If you had logging enabled before, services.sync.log.appender.file.logOnSuccess will be turned on for you automatically.
June 16, 2011 at 10:06 pm
Good idea?
Does it clean out after some time or will profiles grow without bounds?
June 16, 2011 at 10:16 pm
Clean up is planned. See bug 663181.
August 13, 2011 at 7:57 pm
Phil, if you have a chance please take a look at this FF5 bug I opened http://bit.ly/pKm5vz (it involves sync). I’ve stopped using sync as a result and it’s driving me nuts.
Will