2.0.3 • Published 7 years ago

loghub-pro v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

LogHub JavaScript Client

API

// Constructor
const loghub = new LogHub(api_key, app_name, default_tags = {});

// Available methods (Promise returned)
loghub.emergency(message, context = null, tags = {});
loghub.alert(message, context = null, tags = {});
loghub.critical(message, context = null, tags = {});
loghub.error(message, context = null, tags = {});
loghub.warning(message, context = null, tags = {});
loghub.notice(message, context = null, tags = {});
loghub.info(message, context = null, tags = {});
loghub.debug(message, context = null, tags = {});

// Simple UUID v4 generator
LogHub.uuid();

Usage example

const loghub = new LogHub('API_KEY', 'app_name', {
	app_version: '1.2.3',
	user_id: 12345,
	//...
});

loghub.info('Opened page', location.href, {
	action: 'open_page',
	//...
});

loghub.error('Boo!', { error: ..., code: ... });

Free registration

https://loghub.pro/register

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago