micro-log

0.0.1 • Public • Published

micro-log.js

micro logger library for both browsers and node.js

SYNOPSYS

log.setLevel('info');

log.warn('foobar'); // output to console.log by default
log.info('foobar');
log.debug('aaaaaa'); // does not ouput

Send JavaScript errors to server:

log.LOG = function (message) {
	var img = new Image();
	img.src = '/api/report_js_error?' +
		'&loc=' + encodeURIComponent(location.href) +
		'&msg=' + encodeURIComponent(message);
};

Readme

Keywords

none

Package Sidebar

Install

npm i micro-log

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • cho45