This is extension for Gecko-based applications (Firefox, Thunderbird, SeaMonkey), for developers and testers.
Adds ability to write certain console messages to log files, see defaults/preferences/prefs.js for technical details.
Examples
All errors (+warnings) and all messages:
// Console Logger options
{
"All_errors": {
"enabled": true,
"source": "^",
"message": "",
"exclude": ""
},
"All_messages": {
"enabled": true,
"source": "",
"message": "^",
"exclude": ""
}
}
Options example for Private Tab extension:
// Console Logger options
{
"Private_Tab": {
"enabled": true,
"source": "^chrome://privatetab/|/privateTab@infocatcher",
"message": "",
"exclude": "^unsafe CPOW usage|^Only internal code is allowed to set the usePrivateBrowsing attribute"
},
"Private_Tab_messages": {
"enabled": false,
"source": "",
"message": "^\\[Private Tab\\]",
"exclude": ""
}
}
(use Options – Paste to import)
API
You can use Custom Buttons or something similar to open options from toolbar button.
Code:
var obs = "Services" in window && Services.obs
|| Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
var scope = {};
scope.wrappedJSObject = scope;
obs.notifyObservers(scope, "consoleLogger-exportScope", null);
scope.consoleLogger.openOptions();
Also available consoleLogger.openOptionsInWindow()
and consoleLogger.openOptionsInTab()
API to force open options in window or tab.
Icon: chrome://consolelogger/content/icon16.png