This repository contains public Go packages for various utilities.
A structured logging package with support for different log levels and trace context.
go get github.com/duizendstra/go/logging/structured
package main
import (
"github.com/duizendstra/go/logging/structured"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "http://example.com", nil)
logger := structured.NewStructuredLogger("project-id", "component", req)
logger.LogInfo("This is an info message")
}