| 1 | #include "crow.h" |
| 2 | |
| 3 | struct RequestLogger |
| 4 | { |
| 5 | struct context |
| 6 | {}; |
| 7 | |
| 8 | // This method is run before handling the request |
| 9 | void before_handle(crow::request& req, crow::response& /*res*/, context& /*ctx*/) |
| 10 | { |
| 11 | CROW_LOG_INFO << "Request to:" + req.url; |
| 12 | } |
| 13 | |
| 14 | // This method is run after handling the request |
| 15 | void after_handle(crow::request& /*req*/, crow::response& /*res*/, context& /*ctx*/) |
| 16 | {} |
| 17 | }; |
| 18 | |
| 19 | // Per handler middleware has to extend ILocalMiddleware |
| 20 | // It is called only if enabled |
nothing calls this directly
no outgoing calls
no test coverage detected