log4javascript 1.4 Lite

Contents

Introduction

log4javascript Lite is designed to be a basic, lightweight, cross-browser logging tool. It provides functions to log messages of different severity to a pop-up window using the exactly the same syntax as log4javascript.

Top

Code

You can copy the code for log4javascript Lite below:

Press this button to copy the code to the clipboard:

You can either paste the above code inside a script tag:

<script type="text/javascript">
	... [Code here]...
</script>

... or include the log4javascript_lite.js included in the distribution:

<script type="text/javascript" src="log4javascript_lite.js"></script>
<script type="text/javascript">
	var log = log4javascript.getDefaultLogger();
</script>

Using log4javascript Lite is identical to using log4javascript with its default logger:

<script type="text/javascript">
	var log = log4javascript.getDefaultLogger();
	log.debug("What's going on here then?");
</script>

Top

API

The functions available in log4javascript Lite make up a small subset of those provided by log4javascript proper. Each function is named and called identically to the equivalent function in log4javascript. Full details can be found in the log4javascript Lite manual.

Top