0.1.3 • Published 2 years ago
trunk-logs v0.1.3
Installation
npm install --save logsnag
Usage
Import Library
import { LogSnag } from 'logsnag';
Initialize Client
const logsnag = new LogSnag({
token: '7f568d735724351757637b1dbf108e5',
project: 'my-saas'
});
Publish Event
logsnag.publish({
channel: "waitlist",
event: "User Joined",
icon: "🎉",
tags: {
name: "john doe",
email: "john@example.com",
},
notify: true
})
Publish Insight
logsnag.insight({
title: "User Count",
value: "100",
icon: "👨",
})
0.1.3
2 years ago