Util/ Log.js

Creates a simple logger to help debug javascript.  By default it will open a new window so popup blocking may keep it from working.  However, you can redirect the log to a text area or a div if you wish.

Copyright

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

Summary
Creates a simple logger to help debug javascript.
Constructor for the logging window (or other std output if implemented)
Basic log.
log to a text area
log to a string (not implemented)
Writes log output to the id defined as “neurostdout”
Writes log output to the id defined as “neurolog”
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
Start up the log object and make sure any supporting items are created a new window for example.
Changes the output of the error log to go to the predefined area (see the Log constants).
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
the current version

Log

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

Namespace

Sortie.Util

Summary
Basic log.
log to a text area
log to a string (not implemented)
Writes log output to the id defined as “neurostdout”
Writes log output to the id defined as “neurolog”
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
Start up the log object and make sure any supporting items are created a new window for example.
Changes the output of the error log to go to the predefined area (see the Log constants).
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
the current version

Variables

Log. NEW_WINDOW

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

Log. TEXT_AREA

log to a text area

Log. STRING_BUFFER

log to a string (not implemented)

Log. CONSOLE

Writes log output to the id defined as “neurostdout”

Log. USER_DIV

Writes log output to the id defined as “neurolog”

Log. TYPE_DEBUG

used within the class to tell what type of event

Log. TYPE_WARN

used within the class to tell what type of event

Log. TYPE_INFO

used within the class to tell what type of event

Log. TYPE_ERROR

used within the class to tell what type of event

Functions

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. Redirect

Changes the output of the error log to go to the predefined area (see the Log constants).  Often you’ll want to set this before you run Init

Parameters to - where to send the output (see the log constants)

See Also

Log.NEW_WINDOW Log.CONSOLE Log.USER_DIV Log.TEXT_AREA Log.STRING_BUFFER

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

Sortie. Util. Log. VERSION

the current version

Basic log.
Writes log output to the id defined as “neurostdout”
Writes log output to the id defined as “neurolog”
log to a text area
log to a string (not implemented)