util/ Log.js

Creates a simple logger to help debug javascript.  It will open a new window so popup blocking may keep it from working.

Copyright

2005 Rob Rohan (robr.nosp@m.ohan@gmai.nosp@m.l.com)

Summary
Creates a simple logger to help debug javascript.
the library version
set this to true to turn on debug mode (get the console going)
used within the class to tell what type of event
used within the class to tell what type of event
used within the class to tell what type of event
used within the class to tell what type of event
Constructor for the logging window (or other std output if implemented)
Basic log.
Writes log output to the id defined as “neurostdout”
Writes log output to the id defined as “neurolog”
Changes the output of the error log to go to the predefined area (see the Log constants)
Start up the log object and make sure any supporting items are created a new window for example.
Write a debug line to the log
Write an info line to the log
Write a warn line to the log
Write an error line to the log Parameter: line - the text for the log object - (optional) the object this line is from “NO OBJECT” default
a default log for page use.

Variables

DEBUG_VERSION

var DEBUG_VERSION

the library version

DEBUG

var DEBUG

set this to true to turn on debug mode (get the console going)

TYPE_DEBUG

var TYPE_DEBUG

used within the class to tell what type of event

TYPE_WARN

var TYPE_WARN

used within the class to tell what type of event

TYPE_INFO

var TYPE_INFO

used within the class to tell what type of event

TYPE_ERROR

var TYPE_ERROR

used within the class to tell what type of event

Log

Constructor for the logging window (or other std output if implemented)

Summary
Basic log.
Writes log output to the id defined as “neurostdout”
Writes log output to the id defined as “neurolog”
Changes the output of the error log to go to the predefined area (see the Log constants)
Start up the log object and make sure any supporting items are created a new window for example.
Write a debug line to the log
Write an info line to the log
Write a warn line to the log
Write an error line to the log Parameter: line - the text for the log object - (optional) the object this line is from “NO OBJECT” default
a default log for page use.

Variables

Log. NEW_WINDOW

Basic log.  Opens a new window and appends output to the new window

Log. CONSOLE

Writes log output to the id defined as “neurostdout”

Log. USER_DIV

Writes log output to the id defined as “neurolog”

Functions

Log. redirect

Changes the output of the error log to go to the predefined area (see the Log constants)

Log.init

Start up the log object and make sure any supporting items are created a new window for example.  Will check the DEBUG flag and send any text to /dev/null if not in debug mode (i.e.  DEBUG set to false)

Log. debug

Write a debug line to the log

Parameters

linethe text for the log
object(optional) the object this line is from “NO OBJECT” default

Log.info

Write an info line to the log

Parameters

linethe text for the log
object(optional) the object this line is from “NO OBJECT” default

Log.warn

Write a warn line to the log

Parameter

linethe text for the log
object(optional) the object this line is from “NO OBJECT” default

Log. error

Write an error line to the log Parameter: line - the text for the log object - (optional) the object this line is from “NO OBJECT” default

Variables

log

var log

a default log for page use.

var DEBUG_VERSION
the library version
var DEBUG
set this to true to turn on debug mode (get the console going)
var TYPE_DEBUG
used within the class to tell what type of event
var TYPE_WARN
used within the class to tell what type of event
var TYPE_INFO
used within the class to tell what type of event
var TYPE_ERROR
used within the class to tell what type of event
var log
a default log for page use.