How to use the js-logger.warn function in js-logger

To help you get started, we’ve selected a few js-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github archilogic-com / 3dio-js / src / core / configs.js View on Github external
delete args.logLevel
  }

  // prevent secret API key to be included in browser environments
  if (runtime.isBrowser && args.secretApiKey) {
    log.error('The secret API key is not supposed to be used in browser environments!\nPlease see https://3d.io/docs/api/1/get-started-browser.html#secret-api-key for more information.')
  }

  // simply copy over the other configs
  var key, keys = Object.keys(args)
  for (var i = 0, l = keys.length; i < l; i++) {
    key = keys[i]
    if (defaults[key] !== undefined) {
      configs[key] = args[key]
    } else {
      log.warn('Unknown config param "' + key + '". Available params are: ' + Object.keys(defaults).join(', '))
    }
  }

  return this
}