Labs/JS Modules

From MozillaWiki
< Labs
Revision as of 05:48, 8 April 2008 by Thunder (talk | contribs) (New page: Back to Labs. = JavsScript Modules = Here you'll find a collection of modules which you can import into your extension. They are designed to be imported with Components.utils.import...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back to Labs.

JavsScript Modules

Here you'll find a collection of modules which you can import into your extension. They are designed to be imported with Components.utils.import(). If you would like to contribute a new module, get in touch with us at #labs!

Logging

This is a partial implementation of the Log4* interfaces (for example, see log4j or log4net). The original implementation came from Michael Johnston, but it was heavily modified by Dan Mills to get it into Weave.

To use it, create one or more appenders while initializing your add-on, and create loggers in the places where you have logging messages to emit. Both loggers and appenders have minimum log levels to allow you to customize your logging output without changing any code.

The implementation is much less comprehensive than what you might see in the log4* projects at Apache, however. For example, support for serializing the logging configuration or reading it in is non-existent.

(link to file goes here)