Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.02 KB

README.md

File metadata and controls

37 lines (25 loc) · 1.02 KB

snorkel

Logo

GoDoc Go

Scuba for the rest of us.

go get maragu.dev/snorkel

Made in 🇩🇰 by maragu, maker of online Go courses.

Features

  • Simple logger with just a single method, Event, which logs named events with a given sample rate.
  • Sane defaults log to STD_ERR and include event name, sample rate, time, and build info. More to come.
  • No external dependencies.

Usage

package main

import (
	"maragu.dev/snorkel"
)

func main() {
	log := snorkel.New(snorkel.Options{})

	// Log an event with the name "Yo", sample rate 1, and env=sparkly
	log.Event("Yo", 1, "env", "sparkly")
}