1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

logging: several improvements

Former-commit-id: 12538c74a1aa55314c35ac3cf2665646b704851d
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-28 01:58:56 +03:00
parent b02706f207
commit 27ca1c93f5
11 changed files with 125 additions and 56 deletions

View File

@@ -453,8 +453,7 @@ func (api *APIBuilder) CreateRoutes(methods []string, relativePath string, handl
// before join the middleware + handlers + done handlers and apply the execution rules.
mainHandlerName, mainHandlerIndex := context.MainHandlerName(mainHandlers)
wd, _ := os.Getwd()
mainHandlerFileName, mainHandlerFileNumber := context.HandlerFileLineRel(handlers[mainHandlerIndex], wd)
mainHandlerFileName, mainHandlerFileNumber := context.HandlerFileLineRel(handlers[mainHandlerIndex])
// re-calculate mainHandlerIndex in favor of the middlewares.
mainHandlerIndex = len(api.middleware) + len(api.beginGlobalHandlers) + mainHandlerIndex