- Install and set up the collector.
go install https://github.com/evenscribe/evenscribe-go- setup the logger
import (
log "github.com/evenscribe/evenscribe-go"
)
err := log.NewLogger(
log.NewOptions().
WithDefaults().
WithResourceAttributes(map[string]string{"evnviroment": "testing"}).
WithServiceName("logger_test").
WithPrintToStdout(false),
)- Just get logging.
log.Info("i got clicked...")
log.Fatal("oops... i broke")log.InfoS("Hello world", "log-attributes", map[string]string{"hello": "world"}, "trace-id", 12333, "span-id", 11111)