Log in Go

// Setup
f, _ := os.OpenFile("output.log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
defer f.Close()
log.SetOutput(f)

// Log
log.Println("Testing")
Written on December 27, 2017