June 16, 2011
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.
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:
If you had logging enabled before, s
ervices.sync.log.appender.file.logOnSuccess will be turned on for you automatically.
June 13, 2011
We always appreciate it when users let us know about problems they’re experiencing with Sync because it means we can improve it! Here are some guidelines on how to file a good Sync bug:
- Get the Sync log on the machine you’re having problems (these steps assume you’re running the latest version of Firefox; if you’re not, please upgrade):
- Go to about:sync-log in Firefox.
- Find the last log file entry in the list and click on it. It should be called something like
- Save it to a file on disk so you can upload to the bug later.
- If the list in step 2 is empty or only contains outdated logs (you can tell by the dates), go to about:config, find the
services.sync.log.appender.file.logOnSuccesspreference, set it to
true, and sync again. Then repeat these steps.
- File a bug
- Even if you’ve found an existing bug that may look like the one you’re experiencing, do not add your comments to it. Please always file a new bug, we will dupe it appropriately once we’ve determined the root issue. If you want, you can clone the existing bug or make a cross-reference to it in the summary.
- Attach the log file you saved earlier to the bug by uploading an attachment. Do not copy & paste the text into the comment field, it won’t hould enough text!
We’re hoping to automate much of this in upcoming versions of Firefox, so that a Sync problem can automatically be reported to us, or at least with just a few clicks.