How to use the js-logger.INFO 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 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)
    delete args.logLevel
github simplygreatwork / godsend / lib / godsend / server / broker / Logger.js View on Github external
init = function() {

Logger = require('js-logger');
Logger.useDefaults();
Logger.setLevel(Logger.INFO);
Logger.get('broker').setLevel(Logger.INFO);
Logger.get('exchange').setLevel(Logger.INFO);
Logger.get('bus').setLevel(Logger.INFO);
Logger.get('cache').setLevel(Logger.INFO);
Logger.get('connection').setLevel(Logger.INFO);
Logger.get('register').setLevel(Logger.INFO);
Logger.get('request').setLevel(Logger.INFO);
Logger.get('transport').setLevel(Logger.INFO);
Logger.get('server').setLevel(Logger.INFO);
Logger.get('server-web').setLevel(Logger.INFO);
Logger.get('server-socket').setLevel(Logger.INFO);

godsend.Logger = Class.extend({
	
	initialize : function(properties) {
		
		Object.assign(this, properties);
	}
});

};
github simplygreatwork / godsend / src / Logging.js View on Github external
initializeLogger: function() {
		
		Logger.useDefaults();
		Logger.setLevel(Logger.INFO);
		this.initializeInternalLevels(Logger.INFO);
		this.initializeInternalLevels(Logger.OFF);
		Logger.get('exchange-secure').setLevel(Logger.OFF);
		Logger.get('exchange-learning').setLevel(Logger.OFF);
	},
github simplygreatwork / godsend / lib / godsend / server / broker / Logger.js View on Github external
init = function() {

Logger = require('js-logger');
Logger.useDefaults();
Logger.setLevel(Logger.INFO);
Logger.get('broker').setLevel(Logger.INFO);
Logger.get('exchange').setLevel(Logger.INFO);
Logger.get('bus').setLevel(Logger.INFO);
Logger.get('cache').setLevel(Logger.INFO);
Logger.get('connection').setLevel(Logger.INFO);
Logger.get('register').setLevel(Logger.INFO);
Logger.get('request').setLevel(Logger.INFO);
Logger.get('transport').setLevel(Logger.INFO);
Logger.get('server').setLevel(Logger.INFO);
Logger.get('server-web').setLevel(Logger.INFO);
Logger.get('server-socket').setLevel(Logger.INFO);

godsend.Logger = Class.extend({
	
	initialize : function(properties) {
github hawtio / hawtio / hawtio-console-assembly / gulpfile.js View on Github external
const hawtio = require('@hawtio/node-backend');
const tslint = require('gulp-tslint');
const tslintRules = require('./tslint.json');
const exec = require('child_process').exec;
const usemin = require('gulp-usemin');
const uglify = require('gulp-uglify');
const cleanCss = require('gulp-clean-css');
const rev = require('gulp-rev');
const preprocess = require("gulp-preprocess");

const plugins = gulpLoadPlugins({});

const config = {
  proxyPort: argv.port || 8181,
  targetPath: argv.path || '/hawtio/jolokia',
  logLevel: argv.debug ? logger.DEBUG : logger.INFO,
  keycloak: argv.keycloak ? 'true' : 'false',
  app: 'app/',
  src: 'app/src/',
  srcLess: 'app/src/**/*.less',
  srcTemplates: 'app/src/**/!(index|login).html',
  docTemplates: '../@(CHANGES|FAQ).md',
  templateModule: 'hawtio-console-assembly-templates',
  temp: 'temp/',
  dist: 'dist/',
  distFonts: 'dist/fonts',
  distImg: 'dist/img',
  js: 'hawtio-console-assembly.js',
  css: 'hawtio-console-assembly.css',
  tsProject: plugins.typescript.createProject('tsconfig.json'),
  tsLintOptions: {
    rulesDirectory: './tslint-rules/'
github simplygreatwork / godsend / src / Logging.js View on Github external
initializeLogger: function() {
		
		Logger.useDefaults();
		Logger.setLevel(Logger.INFO);
		this.initializeInternalLevels(Logger.INFO);
		this.initializeInternalLevels(Logger.OFF);
		Logger.get('exchange-secure').setLevel(Logger.OFF);
		Logger.get('exchange-learning').setLevel(Logger.OFF);
	},
github simplygreatwork / godsend / examples / shared / server / Server.js View on Github external
initialize: function(properties) {

      Logger.setLevel(Logger.INFO);
      if (false) Logger.setLevel(Logger.OFF);
      Object.assign(this, properties);
      if (this.secure) {
         this.options = {
            key: fs.readFileSync('/home/ubuntu/workspace/trust/server.key.private.pem'),
            cert: fs.readFileSync('/home/ubuntu/workspace/trust/server.cert.pem'),
            requestCert: false
         };
      }
   },