Merge lp:~jamesh/bindwood/log-to-file into lp:bindwood
Status: | Merged |
---|---|
Approved by: | James Henstridge |
Approved revision: | 42 |
Merged at revision: | 42 |
Proposed branch: | lp:~jamesh/bindwood/log-to-file |
Merge into: | lp:bindwood |
Diff against target: |
247 lines (+99/-19) 2 files modified
modules/logging.jsm (+70/-14) modules/sync.jsm (+29/-5) |
To merge this branch: | bzr merge lp:~jamesh/bindwood/log-to-file |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Samuele Pedroni | Approve | ||
Eric Casteleijn (community) | Approve | ||
Review via email: mp+52977@code.launchpad.net |
Commit message
Add support for logging errors and debug messages to a file specified by the BINDWOOD_LOGFILE environment variable.
Description of the change
Currently we log errors to the Firefox error console, with the option to log debug messages if the "bindwood.debug" preference is set to true.
This is inconvenient because the log messages will be mixed with other messages (e.g. CSS errors in pages being visited), and messages may be lost if too many are generated.
This branch adds support for logging Bindwood messages to a file. It is activated by setting the BINDWOOD_LOGFILE environment variable to a file to store the messages to. This will capture both debug messages and errors, irrespective of the "bindwood.debug" preference (I figure that if you want to log to an external file you want everything).
I've also added a few extra logging calls to the synchroniser to help track down bugs.
looks good, tests pass