Skip to content

A go module for publishing events and insights to LogSnag.

License

Notifications You must be signed in to change notification settings

samuel-pratt/logsnag-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

logsnag-go

A go module for publishing events and insights to LogSnag.

Installation

go get github.com/samuel-pratt/logsnag-go

Usage

Import Library

import (
	"github.com/samuel-pratt/logsnag-go"
)

Initialize Client

logSnag := logsnag.NewLogSnag(
    "7f568d735724351757637b1dbf108e5",
    "my-saas"
)

Publish Event

logSnag.Publish(
    "waitlist",         // Channel
    "User Joined",      // Event
    "🛥️",               // Icon
    map[string]any{     // Tags
        "name": "john doe",
        "email": "john@example.com",
    },
    true,               // Notify
)

Publish Insight

logSnag.Insight(
    "User Count",   // Title
    "100",          // Value
    "🛥️",           // Icon
)

About

A go module for publishing events and insights to LogSnag.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages