How to use the js-logger.get 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 simplygreatwork / godsend / src / Exchange.js View on Github external
connected: function(connection) { // next: now update broker and master user records (the patterns at least)
				this.connected = true;
				Logger.get('exchange').info('The secure broker exchange is now connected to the bus as a client.');
				this.connection = connection;
				callback();
			}.bind(this),
			errored : function(errors) {
github thenickdude / snap-to-s3 / lib / snap-to-s3.js View on Github external
_validateTemporaryVolume(volume, snapshot) {
		const
			logger = Logger.get(snapshot.SnapshotId),
			
			// The volume may or may not be GPG-encrypted on S3, so check for both:
			ddKeyPlaintext = createS3KeyForSnapshotVolumeImage(snapshot, true, false),
			ddKeyEncrypted = createS3KeyForSnapshotVolumeImage(snapshot, true, true);
		
		let
			isEncrypted = false;
		
		// Check if we have a dd image in S3 to validate against
		return this.s3.headObject({
			Bucket: this.options.bucket,
			Key: ddKeyPlaintext
		}).promise()
			.catch(err => {
				// Okay, look for an encrypted version instead...
				isEncrypted = true;
github thenickdude / snap-to-s3 / lib / snap-to-s3.js View on Github external
_uploadTemporaryVolume(volume, snapshot) {
		const
			logger = Logger.get(snapshot.SnapshotId),
			
			/**
			 * @type {S3.PutObjectRequest}
			 */
			s3Params = {
				Bucket: this.options.bucket,
				Metadata: {
					"snapshot-starttime": moment(snapshot.StartTime).format(), // Defaults to ISO8601
					"snapshot-snapshotid": snapshot.SnapshotId,
					"snapshot-volumesize": "" + snapshot.VolumeSize,
					"snapshot-volumeid": snapshot.VolumeId,
					"snapshot-description": snapshot.Description,
				}
			},
			
			tags = this._sanitiseSnapshotTagsForS3(snapshot.Tags);
github panarch / concerto / demo / main.js View on Github external
define(function(require, exports, module) {
    var $ = require('jquery');
    var Logger = require('js-logger');
    Logger.useDefaults();
    var L = Logger.get('main');
    var Converter = require('Converter');
    var Renderer = require('Renderer');
    var Player = require('Player');

    var musicjson;

    /*
    var examples = [
        './examples/scales.xml',
        './examples/sonata16.xml', // x
        './examples/adeste.xml',
        './examples/inv4.xml',
        './examples/inv1.xml',
        './examples/test_notations.xml',
        './examples/blank_a7.xml'
    ];
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 rakuten-frontend / rakuten-react-kit / src / domain / logger.ts View on Github external
export function getLogger(name: string) {
  return Logger.get(name);
}
github simplygreatwork / godsend / src / Logging.js View on Github external
initializeInternalLevels : function(level) {
		
		Logger.get('broker').setLevel(level);
		Logger.get('exchange').setLevel(level);
		Logger.get('bus').setLevel(level);
		Logger.get('cache').setLevel(level);
		Logger.get('connection').setLevel(level);
		Logger.get('register').setLevel(level);
		Logger.get('request').setLevel(level);
		Logger.get('transport').setLevel(level);
		Logger.get('server').setLevel(level);
		Logger.get('server-web').setLevel(level);
		Logger.get('server-socket').setLevel(level);
	},
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 thenickdude / snap-to-s3 / lib / snap-to-s3.js View on Github external
_findOrAttachVolumeToInstance(volume, snapshot) {
		let
			logger = Logger.get(snapshot.SnapshotId),
			attachment = volume.Attachments.find(attachment => attachment.InstanceId === this.instanceIdentity.instanceId);
		
		if (attachment) {
			if (attachment.State === "attached") {
				logger.info("Volume " + volume.VolumeId + " is already attached here");
				
				return Promise.resolve(volume);
			} else if (attachment.State === "attaching") {
				logger.info("Volume " + volume.VolumeId + " is already in the process of attaching...");
				
				return awsTools.waitForVolumeAttach(this.ec2, volume.VolumeId, this.instanceIdentity.instanceId, VOLUME_ATTACH_POLL_MAX_RETRY, VOLUME_ATTACH_POLL_INTERVAL);
			}
		}
		
		return new Promise((resolve, reject) => {
			let