How to use the @awesomeeng/awesome-log.debug function in @awesomeeng/awesome-log

To help you get started, we’ve selected a few @awesomeeng/awesome-log 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 awesomeeng / awesome-config / src / ConfigInstance.js View on Github external
root = AwesomeUtils.Object.extend(root,source.content);
		});

		// run the resulting object through our resolver.
		if (this.resolver) this.resolver.resolve(root);

		// prevent our nested children from being mutated.
		// We handle this for the nested child itself in the AwesomeConfig proxy.
		Object.keys(root).forEach((key)=>{
			AwesomeUtils.Object.deepFreeze(root[key]);
		});

		// make our configuration.
		this[$CONFIG] = root;

		Log.debug("Instance "+this.id+" initialized.");
	}
github awesomeeng / awesome-config / src / ConfigInstance.js View on Github external
if (!content) throw new Error("Missing configuration content.");
		if (defaultConditions===null || defaultConditions===undefined) throw new Error("Missing defaultConditions.");
		if (typeof defaultConditions!=="string") throw new Error("Invalid defaultConditions.");
		if (encoding===null || encoding===undefined) throw new Error("Missing encoding.");
		if (typeof encoding!=="string") throw new Error("Invalid encoding.");

		let origin = null;
		let sources = [];

		let valid = false;
		if (AwesomeUtils.Object.isPlainObject(content)) {
			valid = true;
			origin = AwesomeUtils.VM.executionSourceAndLine(4);
			sources = sources.concat([new ConfigSource(origin,content,defaultConditions)]);

			Log.debug("Instance "+(this.id?this.id:"[default]")+" added configuration from origin "+origin+".");
		}
		else if (typeof content==="string") {
			let resolved = resolve(content);
			let filename,stat;
			if (resolved) ({stat,filename} = resolved);
			if (!stat) {
				origin = AwesomeUtils.VM.executionSourceAndLine(4);
				sources = sources.concat(this.parser.parse(origin,content,defaultConditions));
				if (content) valid = true;

				Log.debug("Instance "+(this.id?this.id:"[default]")+" added configuration from origin "+origin+".");
			}
			else if (stat && stat.isDirectory()) {
				Log.debug("Instance "+(this.id?this.id:"[default]")+" looking for config in directory "+filename+".");

				let dir = filename;
github awesomeeng / awesome-config / src / ConfigInstance.js View on Github external
constructor(id) {
		this[$ID] = id;
		this[$SOURCES] = [];
		this[$CONFIG] = null;

		this[$PARSER] = new ConfigParser();
		this[$RESOLVER] = new ConfigResolver();

		Log.debug("Instance "+id+" initialized.");
	}
github awesomeeng / awesome-config / src / ConfigInstance.js View on Github external
stop() {
		if (!this.started) return;

		this[$CONFIG] = null;
		Log.debug("Instance "+this.id+" stopped.");
	}

@awesomeeng/awesome-log

AwesomeLog is a Log System for enterprise nodejs applications. It provides a basic out of the box logging solution that is ready to go with zero configuration but also gives you a highly configurable logging solution that with the power to do your logging

MIT
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis