From 02a5fec6b6a999fb0c108c3f72ad0cb5a75115d3 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 1 Mar 2016 20:42:20 -0500 Subject: [PATCH] Show Query params for invalid URL's --- controllers/main.go | 2 +- main.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/main.go b/controllers/main.go index 8e828df58..73f1b81eb 100644 --- a/controllers/main.go +++ b/controllers/main.go @@ -14,7 +14,7 @@ func (c *MainController) Get() { func (c *MainController) Error404() { if beego.BConfig.RunMode != beego.PROD || beego.BConfig.Log.AccessLogs { r := c.Ctx.Request - devInfo := fmt.Sprintf(" | %-10s | %-40s | %-16s | %-10s |", r.Method, r.URL.Path, " ", "notmatch") + devInfo := fmt.Sprintf("| %-10s | %-40s | %-16s", r.Method, r.URL.Path, r.URL.RawQuery) if beego.DefaultAccessLogFilter == nil || !beego.DefaultAccessLogFilter.Filter(c.Ctx) { beego.Warn(devInfo) } diff --git a/main.go b/main.go index 9b6ecf5fe..b052f3982 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( ) func main() { + beego.BConfig.Log.FileLineNum = false if beego.BConfig.RunMode == "dev" { beego.BConfig.WebConfig.DirectoryIndex = true beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"