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

fix #1560 changes are breaking in App Engine.

cc @giulianobr @philippgille
This commit is contained in:
Bo-Yi Wu 2018-09-27 08:59:44 +08:00 committed by GitHub
parent 834a2ec64c
commit 402ef120e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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