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
// 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) {
github auryn31 / spring-async-rest-example / reactive-vue / src / main.ts View on Github external
import { Component } from "vue-property-decorator";
import * as Logger from "js-logger";
import Vuetify from "vuetify";
import "vuetify/dist/vuetify.css";

import Config from "./config.json";

import * as Store from "./store";
import { store } from "./store";

import router from "./router";

import "./style.scss";
import template from "./main.vue";

let logLevel = (Config.debug ? Logger.DEBUG : Logger.ERROR);
Logger.useDefaults();
Logger.setLevel(logLevel);

Vue.config.errorHandler = function (err, vm, info) {
  Logger.error("Vue error: ", err);
};

Vue.use(Vuetify);

@Component({
  mixins: [template],
  store,
  components: {
  },
  router
})
github twcapps / vue-typescript-boilerplate / template / src / main.ts View on Github external
import { mapGetters, mapActions } from "vuex";

import Config from "./config.json";

import * as Store from "./store";
import { store } from "./store";

import router from "./router";

import Navbar from "./components/navbar";
import Foot from "./components/foot";

import "./style.scss";
import template from "./main.vue";

let logLevel = (Config.debug ? Logger.DEBUG : Logger.ERROR);
Logger.useDefaults();
Logger.setLevel(logLevel);

Vue.config.errorHandler = function (err, vm, info) {
  Logger.error("Vue error: ", err);
};

@Component({
  mixins: [template],
  store,
  components: {
    Navbar,
    Foot
  },
  router
})
github twcapps / vue-typescript-boilerplate / src / main.ts View on Github external
let Config = require("./config.json");

import store from "./store";

import Navbar from "./components/navbar";
import Foot from "./components/foot";

import {router} from "./routes";

import "./style.scss";
let template = require("./main.vue");

Vue.use(VueRouter);

let logLevel = (Config.debug ? Logger.DEBUG : Logger.ERROR);
Logger.useDefaults();
Logger.setLevel(logLevel);

@Component({
  mixins: [template],
  store,
  components: {
    Navbar,
    Foot
  },
  router: router
})
class App extends Vue {
  mounted () {
    Logger.log("mounted");
  }