Golang microseconds in a log packet
1 answer
Modify the log flags to add microseconds. Available flags: http://golang.org/pkg/log/#pkg-constants
log.SetFlags(log.LstdFlags | log.Lmicroseconds)
log.Print("Hello, playground")
// 2009/11/10 23:00:00.000000 Hello, playground
+12
source to share