trunk-logs
v0.1.3
Published
Client
Downloads
4
Readme
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: "[email protected]",
},
notify: true
})
Publish Insight
logsnag.insight({
title: "User Count",
value: "100",
icon: "👨",
})