It is possible to specify log destination with something that statisfies io.Writer interface. With that we can log to file:
package main
import (
"log"
"os"
)
func main() {
logfile, err := os.OpenFile("test.log", os.O_RDWR|os.O_CREATE|os.O_APPEND,...