Template:Infobox Software Log4js is a framework written in JavaScript to log application events.

The framework is very close to the API of Log4j. It is also available under the licence of Apache Software Foundation.

Functionality Edit


The base concept is identical to Log4j. The same log levels and almost all methods are identical.

One special feature of Log4js is the ability to log the events of the browser remote on the server. Using Ajax it is possible to send the logging events in several formats (XML, JSON, plain ASCII etc.) to the server to be evaluated there.

Appender Edit

Following appenders are implemented currently:

Sends the logs via XmlHttpRequest (Ajax) to the server to be processed there.
Logs within the HTML page or in a separate window.
Writes to a local file (Internet Explorer and Mozilla supported).
Appender for the JavaScript Console of Mozilla, Opera and Safari.
Adds the log events to Metatags in the DOM of document.
Using Internet Explorer it is possible to log to Windows System Events.

Layout Edit

The Layout classes are for different formattings of the events:

Simple textual output of the events.
Formats the event as HTML <div>-element.
Converts the events to JSON-objects which are readable in many other programming languages like Perl, PHP and Java.
XML formatted output.

External links Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.