Open Bug 518768 Opened 11 years ago Updated 4 years ago

Rationalize autosync logging

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: davida, Unassigned)

References

(Blocks 1 open bug)

Details

The autosync code is complex, and hard to debug. It doesn't help that the current logging is #ifdef-driven, making it impossible for users to turn on logging.  Furthermore, the logging messages, when enabled, are quite hard to understand.

A phase 1 improvement would be to use PR_LOG instead of #ifdef'ed printfs.

A phase 2 would be to review the code to make sure that the logging statements are as helpful as possible.

It might be nice to do phase 1 in time for TB3 to help troubleshoot problems in the wild.
glad you filed the bug. yes! I could use autosync logging this very moment.
Flags: wanted-thunderbird3?
NSPR_LOG_MODULES=ImapAutoSync:5 will give you autosync logging in tomorrow's build.

In bug 517256, I've cleaned up the logging a little bit, and added some logging of interesting events (like when it actually tries to download message bodies :-) ) and when syncing has been paused/resumed.  I've also got rid of 0 length (i.e., deleted) messages from the queue and hence the log, and no select folders. But a lot more cleanup is still needed.
Blocks: tb-logging
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
You need to log in before you can comment on or make changes to this bug.