Show http-method in logRouterMappings

This commit is contained in:
Benedikt-Alexander Mokroß 2020-03-24 08:34:14 +01:00
parent 56f4d667a9
commit 88d9288f71
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ HttpRouter::BranchRouter::Route HttpRouter::getRoute(const StringKeyLabel& metho
void HttpRouter::logRouterMappings() {
for(auto it : m_branchMap) {
it.second->logRouterMappings();
it.second->logRouterMappings(it.first);
}
}

View File

@ -131,11 +131,11 @@ public:
return Route();
}
void logRouterMappings() {
void logRouterMappings(const oatpp::data::share::StringKeyLabel &branch) {
for(auto& pair : m_endpointsByPattern) {
auto mapping = pair.first->toString();
OATPP_LOGD("Router", "url '%s' -> mapped", (const char*) mapping->getData());
OATPP_LOGD("Router", "url '%s %s' -> mapped", (const char*)branch.getData(), (const char*) mapping->getData());
}
}