Help us shape the future of Go! Take the 2026 Go Developer Survey

test/

directory
v1.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2016 License: MIT

Directories

Path Synopsis
fixtures
godep-basic command
godep-bin-file command
godep-cgo-basic command
godep-devel-go command
godep-old-workspace/Godeps/_workspace/src/github.com/heroku/slog
Package slog provides some Structred Logging helpers ATM: Mostly used to hold some context for a http handler and log at the end of a request Generally should provide the oposite of logfmt: https://github.com/kr/logfmt Sample use in a http.HandleFunc http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { start := time.Now() ctx := slog.Context{} defer func() { fmt.Println(ctx) }() defer func() { ctx.Measure("health.check.duration", time.Since(start)) }() ctx.Count("health.check",1) ...stuff }) Produces a line like so for every request: count#health.check=1 measure#health.check.duration=0.004s
Package slog provides some Structred Logging helpers ATM: Mostly used to hold some context for a http handler and log at the end of a request Generally should provide the oposite of logfmt: https://github.com/kr/logfmt Sample use in a http.HandleFunc http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { start := time.Now() ctx := slog.Context{} defer func() { fmt.Println(ctx) }() defer func() { ctx.Measure("health.check.duration", time.Since(start)) }() ctx.Count("health.check",1) ...stuff }) Produces a line like so for every request: count#health.check=1 measure#health.check.duration=0.004s
godep-vendor command
govendor-basic command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL