Skip to content

Commit

Permalink
Make sure the debug log contains line breaks (#1650)
Browse files Browse the repository at this point in the history
Many debug logs have no line breaks, so fix them here.

- With pull requests:
  - Open your pull request against `master`
  - Your pull request should have no more than two commits, if not you should squash them.
  - It should pass all tests in the available continuous integrations systems such as TravisCI.
  - You should add/modify tests to cover your proposed code changes.
  - If your pull request contains a new feature, please document it on the README.
  • Loading branch information
andeya authored and appleboy committed Nov 22, 2018
1 parent d6b2c13 commit 3d44ff8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func debugPrintLoadTemplate(tmpl *template.Template) {

func debugPrint(format string, values ...interface{}) {
if IsDebugging() {
if !strings.HasSuffix(format, "\n") {
format += "\n"
}
fmt.Fprintf(os.Stderr, "[GIN-debug] "+format, values...)
}
}
Expand Down

0 comments on commit 3d44ff8

Please sign in to comment.