How to use the js-logger.error 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
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)
    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
}
github auryn31 / spring-async-rest-example / reactive-vue / src / main.ts View on Github external
Vue.config.errorHandler = function (err, vm, info) {
  Logger.error("Vue error: ", err);
};
github twcapps / vue-typescript-boilerplate / template / src / main.ts View on Github external
window.onerror = function (errorMsg, url, lineNo, colNo, error) {
  Logger.error("Global event: ", errorMsg);

  Store.commitLoaderVisibility(store, false);
};
github thenickdude / snap-to-s3 / index.js View on Github external
.catch(err => {
		process.exitCode = 1;
		
		if (err instanceof OptionsError) {
			Logger.error(err.message);
		} else if (err instanceof SnapToS3.SnapshotMigrationError) {
			Logger.get(err.snapshotID).error(err);
			Logger.error("");
			Logger.error("Terminating due to fatal errors.");
		} else if (err instanceof SnapToS3.SnapshotsMissingError) {
			Logger.error(err);
		} else {
			Logger.error(err);
			Logger.error("");
			Logger.error("Terminating due to fatal errors.");
		}
	});
}
github thenickdude / snap-to-s3 / index.js View on Github external
.catch(err => {
		process.exitCode = 1;
		
		if (err instanceof OptionsError) {
			Logger.error(err.message);
		} else if (err instanceof SnapToS3.SnapshotMigrationError) {
			Logger.get(err.snapshotID).error(err);
			Logger.error("");
			Logger.error("Terminating due to fatal errors.");
		} else if (err instanceof SnapToS3.SnapshotsMissingError) {
			Logger.error(err);
		} else {
			Logger.error(err);
			Logger.error("");
			Logger.error("Terminating due to fatal errors.");
		}
	});
}
github twcapps / vue-typescript-boilerplate / template / src / main.ts View on Github external
Vue.config.errorHandler = function (err, vm, info) {
  Logger.error("Vue error: ", err);
};
github auryn31 / spring-async-rest-example / reactive-vue / src / main.ts View on Github external
window.onerror = function (errorMsg, url, lineNo, colNo, error) {
  Logger.error("Global event: ", errorMsg);

  Store.commitLoaderVisibility(store, false);
};
github archilogic-com / 3dio-js / src / utils / auth / log-out.js View on Github external
}).catch(function onError (error) {

    log.error('Log out error.', error)
    return Promise.reject(error)

  })
}
github thenickdude / snap-to-s3 / index.js View on Github external
.catch(err => {
		process.exitCode = 1;
		
		if (err instanceof OptionsError) {
			Logger.error(err.message);
		} else if (err instanceof SnapToS3.SnapshotMigrationError) {
			Logger.get(err.snapshotID).error(err);
			Logger.error("");
			Logger.error("Terminating due to fatal errors.");
		} else if (err instanceof SnapToS3.SnapshotsMissingError) {
			Logger.error(err);
		} else {
			Logger.error(err);
			Logger.error("");
			Logger.error("Terminating due to fatal errors.");
		}
	});
}