Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

logging/logging_init.java File Reference


Detailed Description

Executed after all other files in burst.logging.* are loaded.

Defines bu_Log and configures its appenders.

Author:
Copyright 2003 Mark D. Anderson (mda@discerning.com)

Licensed under the Academic Free License 1.2 http://www.opensource.org/licenses/academic.php


Functions

 bu_alert (String message)
 The function bu_alert does not use burst.logging.Log functionality.

 bu_debug (...)
 Convenience for bu_Log.debug(...).

 bu_info (...)
 Convenience for bu_Log.info(...).

 bu_warn (...)
 Convenience for bu_Log.warn(...).

 bu_error (...)
 Convenience for bu_Log.error(...).


Variables

Object BU_LOG_ROOT_MAX_LEVEL
 You may optionally set this, prior to loading the library, to control the debug level that applies between when the files are loaded, and when external logging configuration is done.

burst.logging.Log bu_Log = new burst.logging.Log('root', null, burst.logging.Log.toLevelObject(BU_LOG_ROOT_MAX_LEVEL))
 A global instance of BU_Log which is the root logger.

Boolean BU_LOG_USE_JSUNIT_APPENDER
 You may optionally set this variable, prior to loading the library, to control whether when a JsUnit implementation has previously been loaded, we should use an appender which sends to the JsUnit implementation's debug output channel (so that test output is interleaved).

Boolean BU_LOG_USE_PRINTLN_APPENDER
 You may optionally set this variable prior to loading BU_Log.js to control whether, when the environment has a println function (as determined from bu_Runtime.println), we should default to creating an appender which uses it.


Function Documentation

bu_alert String  message  ) 
 

The function bu_alert does not use burst.logging.Log functionality.

In a browser, it calls window.alert. In a shell, it calls the global print. Otherwise it does nothing.

Should be used judiciously, since after all bu_info/bu_warn/bu_error could be configured to go to an appender which does a window.alert instead.


Variable Documentation

Object BU_LOG_ROOT_MAX_LEVEL
 

You may optionally set this, prior to loading the library, to control the debug level that applies between when the files are loaded, and when external logging configuration is done.

As usual, it can be a Number value, String name, or Object such as BU_Log.DEBUG. If it is not externally set, "WARN" is used.

Boolean BU_LOG_USE_JSUNIT_APPENDER
 

You may optionally set this variable, prior to loading the library, to control whether when a JsUnit implementation has previously been loaded, we should use an appender which sends to the JsUnit implementation's debug output channel (so that test output is interleaved).

If no JsUnit implementation is previously loaded (determined by testing for certain symbols), then this has no effect. By default it is not set, and this behavior is not done.

Note that this works regardless of which JsUnit implementation is used (our wrapper, or some other one used directly).

Boolean BU_LOG_USE_PRINTLN_APPENDER
 

You may optionally set this variable prior to loading BU_Log.js to control whether, when the environment has a println function (as determined from bu_Runtime.println), we should default to creating an appender which uses it.

If the environment has no println (or equivalent), as is typical in a browser, then this has no effect. If not already set by the application, this is set to true.


Generated on Tue Nov 30 04:03:08 2004 for BurstProject by doxygen 1.3.4