mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-18 16:09:07 +08:00
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:
6
debug.go
6
debug.go
@ -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
|
||||
|
Reference in New Issue
Block a user