1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 11:57:02 +00:00

add a way to customize the handler names (recommended: before server execution) so route logging can be more human-friendly on handlers like standard iris middlewares, e.g. request logger

Former-commit-id: 039c233f2d4da0d52b1d6fc86b6d73be14b15608
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-27 15:48:09 +03:00
parent f75ec4e67c
commit d1f18501e8
7 changed files with 144 additions and 45 deletions

View File

@@ -174,7 +174,7 @@ func (h *routerHandler) Build(provider RoutesProvider) error {
defer golog.SetTimeFormat(bckpTimeFormat)
golog.SetTimeFormat("")
for _, method := range AllMethods { // TODO: MethodNone "NONE" with an (offline) status on r.Trace.
for _, method := range append(AllMethods, MethodNone) {
methodRoutes := collect(method)
for _, r := range methodRoutes {
golog.Println(r.Trace())