lib/_provisioning/provision-util.js
function (error, options) {
    options = options || {}
    var verbosity = options.verbosity || 0
    var message = module.exports.getErrorMessage(
      typeof error === 'object' ? error.message : error, options.component,
      options.header)
    if (typeof header === 'undefined') {
      message = 'ERROR: ' + message
    }
    console.error(message)
    if ((verbosity > 1) && (typeof error === 'object') && error.stack) {
      console.log(error.stack)
    }
  }
function (error, options) {
    options = options || {}
    var verbosity = options.verbosity || 0
    var message = module.exports.getErrorMessage(
      typeof error === 'object' ? error.message : error, options.component,
      options.header)
    if (typeof header === 'undefined') {
      message = 'ERROR: ' + message
    }
    console.error(message)
    if ((verbosity > 1) && (typeof error === 'object') && error.stack) {
      console.log(error.stack)
    }
  }
function ( error , options ) { options = options || { } var verbosity = options . verbosity || 0 var message = module . exports . getErrorMessage ( typeof error === 'object' ? error . message : error , options . component , options . header ) if ( typeof header === 'undefined' ) { message = 'ERROR: ' + message } console . error ( message ) if ( ( verbosity > 1 ) && ( typeof error === 'object' ) && error . stack ) { console . log ( error . stack ) } }
Writes an error to the log.
@param {(String|Error)} error - The Error or error message string to log.
@param {Object} [options] - Error message options.
@param {String} [options.component] - Description of the system component
in which the error occurred.
@param {String} [options.header] - Prefix to include before the error
message.
@param {Number} [options.verbosity] - Level of verbosity at which to log
the error message.
Writes an error to the log .