Print warning log when user create one engine using gin.Default in debug mode (#1121)

* empty string check

* add log when use Default

* fix unit test error

* fix unit test error
This commit is contained in:
田欧
2017-09-28 22:58:57 -05:00
committed by Bo-Yi Wu
parent 3b300929e8
commit 0cb7c44abc
3 changed files with 25 additions and 0 deletions

View File

@ -46,6 +46,12 @@ func debugPrint(format string, values ...interface{}) {
}
}
func debugPrintWARNINGDefault() {
debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
`)
}
func debugPrintWARNINGNew() {
debugPrint(`[WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release