Javascript Logging Frameworks - Ajax Patterns

Javascript Logging Frameworks

From Ajax Patterns

See also Javascript_Multipurpose_Frameworks, Ajax_Frameworks, and Browser-Side_Logging pattern.

Contents

Ajax/Javascript Programming and Usability in "Ajax Design Patterns" Book

log4javascript

log4javascript

log4javascript is a JavaScript logging framework based on the Java logging framework log4j. Its purpose is to provide JavaScript developers with a familiar, robust and flexible logging framework with which to debug JavaScript applications. This is becoming increasingly important as web interfaces become richer thanks to the recent appreciation of the possibilities of Ajax.

log4javascript's main features:

  • based on Java's log4j, implementing loggers, appenders, layouts and levels, providing a familiar interface;
  • a powerful log console with severity filters and searching (including regular expression searches);
  • a flexible Ajax appender that posts log messages back to the server;
  • several layouts for flexible formatting of log messages, including XML, JSON, and Pattern layouts;
  • crunched and stub versions of the main .js file included in the distribution.

Since a major use of JavaScript logging is in browser testing, log4javascript is tested and works across all recent major browsers, including :

  • IE5+ (for Windows)
  • Mozilla, Firefox, Netscape
  • Safari 1.3+
  • Opera 7.5+
  • Konqueror 3.4+

log4javascript is distributed under the Apache License, Version 2.0.

JSLog

JSLog is a Javascript logging framework.

  • JSLog's focus is on ease of integration and deployment, providing a logging infrastructure with minimal performance impacts, and allowing you to easily "productionize" you code (even with the logging statements still included), by changing one configuration setting.
  • Open-source by Andre Lewis

Lumberjack

Lumberjack is a javascript logging framework that includes a sexy logging pane/console that stays at the bottom of the page. You can toggle the pane. Demo is right on the project page.

Log4Js

Log4js is a logging API for JavaScript. The main goal is to have a robust and solid logging API which is very simmilar to the Java logging API Log4j. There are several ways to log using "appender"s. The current available Appenders are:

  • DummyAppender: log nothing.
  • ConsoleAppender: open a new window in the browser or an inline div element and insert log messages in real time.
  • WindowsEventAppender: send log messages in the MS Windows event manager (Internet Explorer only).
  • FileAppender: write log messages in a local file on the client (IE and Mozilla).
  • AjaxAppender: allow to send log messages to a remote server with asynchronous HTTP request.
  • MetatagAppender: add log messages as meta data.
  • JavaScript Console Appenders for Opera, Mozilla and Safari

Many Appender can be used in a same time.

To format the logs there are several "Layout" implementations available.

Log4js is distributed under the Apache License, Version 2.0.

jsTracer

jsTracer jsTracer is a simple yet feature rich JavaScript logging and debugging tool. It is especially useful for debugging what has been coined "Web 2.0" code.

As the demand for increasingly complex JavaScript development rises with the appeal of "Web 2.0", I've been shocked to discover how few tools are available for the JavaScript developer. This is especially true of cross browser development.

jsTracer was written to help fill this void.