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
// default configs values

var defaults = Object.freeze({
  logLevel: 'warn',
  publishableApiKey: getPublishableApiKeyFromUrl(),
  secretApiKey: null,
  servicesUrl: 'https://spaces.archilogic.com/api/v2',
  storageDomain: 'storage.3d.io',
  storageDomainNoCdn: 'storage-nocdn.3d.io'
})

// constants

var LOG_STRING_TO_ENUM = {
  error: log.ERROR,
  warn: log.WARN,
  info: log.INFO,
  debug: log.DEBUG
}

// main

var configs = function configs (args) {

  if (!args) {
    // no arguments: return copy of configs object
    return JSON.parse(JSON.stringify(this))
  }

  // apply log level if among arguments
  if (args.logLevel) {
    setLogLevel(args.logLevel)