Links

Deno

Usage

Import Library

import { LogSnag } from 'npm:logsnag';
import { LogSnag } from 'https://cdn.logsnag.com/deno/0.1.6/index.ts';

Initialize Client

const logsnag = new LogSnag({
token: '7f568d735724351757637b1dbf108e5',
project: 'my-saas'
});

Publish Event

await logsnag.publish({
channel: "waitlist",
event: "User Joined",
description: "Email: [email protected]",
icon: "🎉",
tags: {
name: "john doe",
},
notify: true
})

Publish Insight

await logsnag.insight({
title: "User Count",
value: "100",
icon: "👨"
})