mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-15 04:33:40 +08:00
Setting logging to release mode in example
Debug causes App Engine to fail building, output looks like this: ``` ERROR 2015-03-22 04:15:01,027 http_runtime.py:285] bad runtime process port ['[GIN-debug] GET / --> web.func\xc2\xb7001 (1 handlers)\n'] ``` Setting to ReleaseMode fixes this.
This commit is contained in:
parent
5857ddcd2c
commit
e1344a901b
@ -9,6 +9,7 @@ import (
|
|||||||
func init() {
|
func init() {
|
||||||
// Starts a new Gin instance with no middle-ware
|
// Starts a new Gin instance with no middle-ware
|
||||||
r := gin.New()
|
r := gin.New()
|
||||||
|
gin.SetMode(gin.ReleaseMode)
|
||||||
|
|
||||||
// Define your handlers
|
// Define your handlers
|
||||||
r.GET("/", func(c *gin.Context){
|
r.GET("/", func(c *gin.Context){
|
||||||
@ -20,4 +21,4 @@ func init() {
|
|||||||
|
|
||||||
// Handle all requests using net/http
|
// Handle all requests using net/http
|
||||||
http.Handle("/", r)
|
http.Handle("/", r)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user