Selaa lähdekoodia

fix: fmt output log to os.Stderr (#1571)

fix #1560 changes are breaking in App Engine.

cc @giulianobr @philippgille
Bo-Yi Wu 7 vuotta sitten
vanhempi
commit
402ef120e1
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      debug.go

+ 2 - 1
debug.go

@@ -8,6 +8,7 @@ import (
 	"bytes"
 	"fmt"
 	"html/template"
+	"os"
 	"runtime"
 	"strconv"
 	"strings"
@@ -50,7 +51,7 @@ func debugPrintLoadTemplate(tmpl *template.Template) {
 
 func debugPrint(format string, values ...interface{}) {
 	if IsDebugging() {
-		fmt.Printf("[GIN-debug] "+format, values...)
+		fmt.Fprintf(os.Stderr, "[GIN-debug] "+format, values...)
 	}
 }