Skip to content
Adds ability to write certain console messages to log files, restartless extension for Gecko-based applications
JavaScript CSS Batchfile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
components
defaults/preferences
locale
README.md
bootstrap.js
changelog-ru.md
changelog.md
chrome.manifest
core.js
icon.png
icon16.png
install.rdf
io.js
json.js
license.txt
make.bat
make.sh
options.css
options.js
options.xml
optionsOpener.xul
optionsWindow.xul

README.md

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

You can’t perform that action at this time.