]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: set log prefix and suppress date
authorShenghou Ma <minux@golang.org>
Thu, 19 Nov 2015 04:39:53 +0000 (23:39 -0500)
committerMinux Ma <minux@golang.org>
Thu, 19 Nov 2015 23:55:50 +0000 (23:55 +0000)
Fixes #13320.

Change-Id: I3a96a6707982629caf89656c479d096891783328
Reviewed-on: https://go-review.googlesource.com/17050
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/main.go

index 91c48313b7a205a7ffc839cfe31bdc2648a5d35b..3d11f515a29d6118a80601f1230cc23a675da643 100644 (file)
@@ -13,10 +13,15 @@ import (
        "cmd/compile/internal/x86"
        "cmd/internal/obj"
        "fmt"
+       "log"
        "os"
 )
 
 func main() {
+       // disable timestamps for reproducible output
+       log.SetFlags(0)
+       log.SetPrefix("compile: ")
+
        switch obj.Getgoarch() {
        default:
                fmt.Fprintf(os.Stderr, "compile: unknown architecture %q\n", obj.Getgoarch())