lib/core.js
function init(settings) {
  var opts = settings || {},
    i;

  if (opts.onError !== false) {
    Canadarm.setUpOnErrorHandler();
  }

  if (opts.wrapEvents !== false) {
    Canadarm.setUpEventListening();
  }

  if (opts.appenders) {
    for (i = 0; i < opts.appenders.length; i++) {
      Canadarm.addAppender(opts.appenders[i]);
    }
  }

  if (opts.handlers) {
    for (i = 0; i < opts.handlers.length; i++) {
      Canadarm.addHandler(opts.handlers[i]);
    }
  }

  if (opts.logLevel) {
    Canadarm.loggingLevel = opts.logLevel;
  }
}
function init(settings) {
  var opts = settings || {},
    i;

  if (opts.onError !== false) {
    Canadarm.setUpOnErrorHandler();
  }

  if (opts.wrapEvents !== false) {
    Canadarm.setUpEventListening();
  }

  if (opts.appenders) {
    for (i = 0; i < opts.appenders.length; i++) {
      Canadarm.addAppender(opts.appenders[i]);
    }
  }

  if (opts.handlers) {
    for (i = 0; i < opts.handlers.length; i++) {
      Canadarm.addHandler(opts.handlers[i]);
    }
  }

  if (opts.logLevel) {
    Canadarm.loggingLevel = opts.logLevel;
  }
}
function init ( settings ) { var opts = settings || { } , i ; if ( opts . onError !== false ) { Canadarm . setUpOnErrorHandler ( ) ; } if ( opts . wrapEvents !== false ) { Canadarm . setUpEventListening ( ) ; } if ( opts . appenders ) { for ( i = 0 ; i < opts . appenders . length ; i ++ ) { Canadarm . addAppender ( opts . appenders [ i ] ) ; } } if ( opts . handlers ) { for ( i = 0 ; i < opts . handlers . length ; i ++ ) { Canadarm . addHandler ( opts . handlers [ i ] ) ; } } if ( opts . logLevel ) { Canadarm . loggingLevel = opts . logLevel ; } }
Used to setup Canadarm for consumers. The properties below are for the settings
object passed to the init function.

@example
Canadarm.init({
onError: true,  // Set to false if you do not want window.onerror set.
wrapEvents: true, // Set to false if you do not want all event handlers to be logged for errors
logLevel: Canadarm.level.WARN, // Will only send logs for level of WARN and above.
appenders: [
Canadarm.Appender.standardLogAppender
],
handlers: [
Canadarm.Handler.beaconLogHandler('http://example.com/beacon.gif'),
Canadarm.Handler.consoleLogHandler
]
})

@function init

@param {object} settings - options for setting up canadarm.
@property settings[onError] {boolean}    - True, Canadarm will set onerror. Defaults to true.
@property settings[wrapEvents] {boolean} - True, Canadarm will wrap event binding. Defaults to true.
@property settings[appenders] {Array}    - Array of Appenders for Canadarm to use. Defaults to empty.
@property settings[handlers] {Array}     - Array of Handlers for Canadarm to use. Defaults to empty.
@property settings[logLevel] {String}    - The log level to log at. Defaults to Canadarm.level.DEBUG.
Used to setup Canadarm for consumers . The properties below are for the settings object passed to the init function .