Skip to content

Commit

Permalink
fix: output log to os.Stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy committed Sep 26, 2018
1 parent b02e4f2 commit d8f0553
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"bytes"
"fmt"
"html/template"
"os"
)

// IsDebugging returns true if the framework is running in debug mode.
Expand Down Expand Up @@ -45,7 +46,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...)
}
}

Expand Down

0 comments on commit d8f0553

Please sign in to comment.