mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Hide WebDriver::match_route debug behind its own flag
When enabling WEBDRIVER_DEBUG globally, this function's debug spam overpowers the rest of the useful logs.
This commit is contained in:
committed by
Andreas Kling
parent
f739e976a4
commit
bc9c710904
@@ -109,7 +109,7 @@ static constexpr auto s_webdriver_endpoints = Array {
|
||||
// https://w3c.github.io/webdriver/#dfn-match-a-request
|
||||
static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_string_view(request.method()), request.resource());
|
||||
dbgln_if(WEBDRIVER_ROUTE_DEBUG, "match_route({}, {})", HTTP::to_string_view(request.method()), request.resource());
|
||||
|
||||
auto request_path = request.resource().view();
|
||||
Vector<String> parameters;
|
||||
@@ -128,7 +128,7 @@ static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request
|
||||
};
|
||||
|
||||
for (auto const& route : s_webdriver_endpoints) {
|
||||
dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_string_view(route.method), route.path);
|
||||
dbgln_if(WEBDRIVER_ROUTE_DEBUG, "- Checking {} {}", HTTP::to_string_view(route.method), route.path);
|
||||
if (route.method != request.method())
|
||||
continue;
|
||||
|
||||
@@ -156,7 +156,7 @@ static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request
|
||||
}
|
||||
|
||||
if (*match) {
|
||||
dbgln_if(WEBDRIVER_DEBUG, "- Found match with parameters={}", parameters);
|
||||
dbgln_if(WEBDRIVER_ROUTE_DEBUG, "- Found match with parameters={}", parameters);
|
||||
return MatchedRoute { route.handler, move(parameters) };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user