logger.js

Summary
logger.js
bbop.loggerBBOP JS logger object.
Functions
loggerArguments: (optional) initial context.
Variables
DEBUGDifferent debugging available per object.
Functions
reset_contextDefine the ability to reset the contex.
push_contextAdd an additional logging context to the stack.
pop_contextRemove the last context if it’s there.
kvetchLog a string to somewhere.

bbop.logger

BBOP JS logger object.  Using .kvetch(), you can automatically log a message in almost any environment you find yourself in--browser, server wherever.  Also, if you have jQuery available and an element with the id “bbop-logger-console-textarea”, “bbop-logger-console-text”, or “bbop-logger-console-html”, the logger will append to that element (with a “\n” (autoscroll), “\n”, or “<br />” terminator respectively) instead.

Summary
Functions
loggerArguments: (optional) initial context.
Variables
DEBUGDifferent debugging available per object.
Functions
reset_contextDefine the ability to reset the contex.
push_contextAdd an additional logging context to the stack.
pop_contextRemove the last context if it’s there.
kvetchLog a string to somewhere.

Functions

logger

bbop.logger = function(initial_context)

Arguments: (optional) initial context.

Variables

DEBUG

this.DEBUG

Different debugging available per object.  Externally toggle between true and false to switch on and off the logging.

Functions

reset_context

this.reset_context = function(new_initial_context)

Define the ability to reset the contex.

Arguments

new_initial_context(optional) New context to start with.

push_context

this.push_context = function(new_context)

Add an additional logging context to the stack.

Arguments

new_contextNew context to add to the context stack.

pop_context

this.pop_context = function()

Remove the last context if it’s there.

kvetch

this.kvetch = function(string)

Log a string to somewhere.  Also return a string to (mostly for the unit tests).

Arguments

stringThe string to print out to wherever we found.
bbop.logger = function(initial_context)
Arguments: (optional) initial context.
this.DEBUG
Different debugging available per object.
this.reset_context = function(new_initial_context)
Define the ability to reset the contex.
this.push_context = function(new_context)
Add an additional logging context to the stack.
this.pop_context = function()
Remove the last context if it’s there.
this.kvetch = function(string)
Log a string to somewhere.
Close