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
)