diff options
Diffstat (limited to 'src/nxt_http_route.c')
-rw-r--r-- | src/nxt_http_route.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c index a4dd8f4a..f439c957 100644 --- a/src/nxt_http_route.c +++ b/src/nxt_http_route.c @@ -1548,6 +1548,18 @@ nxt_http_route_handler(nxt_task_t *task, nxt_http_request_t *r, for (i = 0; i < route->items; i++) { action = nxt_http_route_match(task, r, route->match[i]); + + if (nxt_slow_path(r->log_route)) { + uint32_t lvl = (action == NULL) ? NXT_LOG_INFO : NXT_LOG_NOTICE; + const char *sel = (action == NULL) ? "discarded" : "selected"; + + if (route->name.length == 0) { + nxt_log(task, lvl, "\"routes/%z\" %s", i, sel); + } else { + nxt_log(task, lvl, "\"routes/%V/%z\" %s", &route->name, i, sel); + } + } + if (action != NULL) { return action; } |