This javascript libary is a SDK for the LogHive event and log service. LogHive is a log and event service specifically designed for software applications such as apps, websites, or services. With LogHive, push notifications can be sent to the web browser or to a mobile device, or the log messages can be analyzed in a separate dashboard.
Licence: MIT
Integration is very easy, a simple REST command is all that's needed to store your event in our database. This libary packs the http client into a nuget package. So you can push an event with just two lines of code.
To use this API you need an API key. You can register for a free API key at https://app.loghive.app.
A full documentation is available under https://docs.loghive.app/.
npm install --save loghive
import { LogHive } from 'loghive';
With the following code, you init the http client with your personal API key:
const logging = new LogHive({
key: 'your-personal-api-key',
project: 'yourprojectname'
});
logging.addEvent({
group: "yourgroupname",
event: "your-event-name",
description: "descripton",
notify: true
});
logging.addInsight({
insight: "your-insight-name",
value: 100
});
logging.setSystemOnline({
system: "your-system-name"
});
logging.setSystemOffline({
system: "your-system-name"
});